• Kumar_Shah
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 4
    Replies
Hello,

I am planning to implement Platform events for most of the after save operations on my account trigger. If I define a new platform event object for each operation, there could be too many platform events objects. Will it be the right approach to define platform events for each after save operation or is there a generic platform event object design?

P.S. I am going to use platform events to enforce async operation on the trigger.

Thanks in advance. 
Hello,

I would like to call REST API after updating an account record only if account status = active and type = 'employer', I can either call Change Data Capture (CDC) or Platform Events. Which one is better and why?

Thanks in advance.
Hello,

I would like to know the best practices or guidelines to create and main Salesforce Flows. As I understand, either I can create Salesforce Flow per object, or I can create per business process. If I create a flow per object then it may be difficult to maintain and convoluted with so many paths. If I create per business process then I may end up creating so many Flows and difficult to debug and track which one is executing when and may run into ROW LOCK or duplicate operation issues.

Please suggest the recommended option and share if there are any guidelines.

Thank you,
A Contact Support Form on a community allows users to create a case for a customer. This form contains customer contact information (email, name, phone, etc). When a case is created, it populates Contact Name by default as Community User and populates an Account Name that shares a case with a community user. 

I don't want to populate Account Name when a case is being the case and still want to share the case with the community user. 

P.S. In Sharing Setting, I don't want to uncheck the "Grant site users access to related cases" option.
An external application calls standard File upload API to upload files on a case record and the application makes ~60 API calls in less than a minute to upload files. For each transaction, it triggers a case trigger and since, the external application uploads it on the same case record, it triggers ~60 times the case trigger and running into a ROW LOCK issue.

Thanks, 
Hello,

I would like to persist value in lightning components, similar to the session variable but this is on client-side only. E.g. I would like to store Listview sorting order when a user navigates from page 1 to page 2. When the user returns back to page 1, I would like to display the same sorting order. One of the ways is events but I was looking for other options. Tried to search on sessionStorage but didn't find more help on it.

Thanks,
How to avoid the following exception. I added FOR UPDATE in SOQL statement but it still throws the following exception.

Question 1: As per the documentation, if the operation takes more than 10 seconds, it will throw this error. In my scenario, it takes less than 10 seconds but still throws an error.

Question 2: Let us say, the operation takes more than 10 seconds, how we can avoid this error?

Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
System.QueryException: Record Currently Unavailable: The record you are attempting to edit, or one of its related records, is currently being modified by another user. Please try again

Thanks,
Hello,

I created a custom global variable and I want to store in Aura Component without making $A.enqueueAction each time. Is there a way to access it, the way we access standard global variables in lightning.

Thanks,
Hello,

I want to store a value which can be accessed throughout the entire user's session in the community. When user logout or session times out, it should reset the value. Similar to session variable in .NET/C#. I tried with the following options:

1. Static - Scope is limited to the per transaction and resets. 
2. Global - I tried to store in global variable however, the stored value is not accessible when I refresh the page in Community. 
3. Custom Setting - It has the option to store as Hierarchy but my application has more than 10k users and I can't store the value upfront for each user
4. Platform cache - It works but the behaviour is not consistent. Sometimes, it returns the correct value and some time, it is null.

I don't want to store a value as a custom field on a user object. Is there a better solution.

Thanks,
Hello,

As I understand, Process Builder runs under the system mode and if the running user doesn't have permission, the user still able to perform the operation due to system mode. I tried to create a chatter post on a case object using Process Builder, by running as a user who has implicit permission on the case. When I looked at the log, it still runs under the user mode (I can see as Current User) and got the following error while creating a chatter post

Error Occurred: You don't have permission to do this. 
________________________________________
________________________________________
Salesforce Error ID: 157378386-59592 (1177104658)

Thanks,
What is the best way to trace all methods which are getting executed in a transaction? I am looking for mainly debugging purpose where I get SOQL 101 error. I am not sure how to find if any workflow rules, process builder or triggers are getting executed.

Thanks,
An external application calls standard File upload API to upload files on a case record and the application makes ~60 API calls in less than a minute to upload files. For each transaction, it triggers a case trigger and since, the external application uploads it on the same case record, it triggers ~60 times the case trigger and running into a ROW LOCK issue.

Thanks, 
Hello,

I would like to persist value in lightning components, similar to the session variable but this is on client-side only. E.g. I would like to store Listview sorting order when a user navigates from page 1 to page 2. When the user returns back to page 1, I would like to display the same sorting order. One of the ways is events but I was looking for other options. Tried to search on sessionStorage but didn't find more help on it.

Thanks,
Hello,

As I understand, Process Builder runs under the system mode and if the running user doesn't have permission, the user still able to perform the operation due to system mode. I tried to create a chatter post on a case object using Process Builder, by running as a user who has implicit permission on the case. When I looked at the log, it still runs under the user mode (I can see as Current User) and got the following error while creating a chatter post

Error Occurred: You don't have permission to do this. 
________________________________________
________________________________________
Salesforce Error ID: 157378386-59592 (1177104658)

Thanks,
What is the best way to trace all methods which are getting executed in a transaction? I am looking for mainly debugging purpose where I get SOQL 101 error. I am not sure how to find if any workflow rules, process builder or triggers are getting executed.

Thanks,