function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Giancarlo AmatiGiancarlo Amati 

Process builder flow failed API Limit

Dear Team,
I have a process builder flow which simply checks the value of a field and it updates another field in the Account record. 
Oddly, another update process somehow made the FLOW failing so many times that I received the following error message. I don't understand then the connection between the two flows. 

Any suggestions on how to fix it? Oddly this happens quite often when I create processes with Process Builders, but it doesn't happen when I create actual Workflows. 

Thank you.
GC

The flow tried to update these records: null. This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: DSCORGPKG.DiscoverOrgCustomMapping_Account: System.LimitException: Apex CPU time limit exceeded. You can look up ExceptionCode values in the SOAP API Developer Guide.---The flow tried to update these records: null. This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: DSCORGPKG.DiscoverOrgCustomMapping_Account: System.LimitException: Apex CPU time limit exceeded. You can look up ExceptionCode values in the SOAP API Developer Guide.​​​​​​​

User-added image
 
Pawel BorysPawel Borys
Hi, what are the entry criteria for the process? Are you sure it does not enter a loop when it updates a field and then fires again because the record was updated?
Otherwise, this might be caused by triggers or other processes being fired on the update. You can try checking the logs to see what exactly is happening.
Giancarlo AmatiGiancarlo Amati
I'm not sure I understand it, when you say "Entry criteria" do you mean the one below?


User-added image
Pawel BorysPawel Borys
Yes. So every time the record is edited, this process fires. Did you make sure that it's not going to update the field multiple times? I think you have a null check in the first screen but I don't see if it's the same field that's being updated. If you have that secured, then I would look for another process or trigger firing and taking too much time to complete.
Giancarlo AmatiGiancarlo Amati
Hi,

so I have three conditions on that process and they all look like the one below with the logic (1 OR 2 OR 3) AND 4  where basically if a field called "Revenue Bucket" is empty then automatically update the "Revenue Bucket" field, otherwise do nothing else. 

I don't understand where I have more than 100+ messages tho but I think there was a scheduled process going on. Besides that, I think this process builder should be transformed into a Workflow + Field Update to make my life easier.
GC

User-added image

User-added image
Pawel BorysPawel Borys
Generally, according to Salesforce, you should not create any new workflows but use process builder. However, If you tried with a workflow for this specific update and it worked then it might be an order of execution issue and a workflow rule is a good solution. I would still suggest to analyse the debug logs for this to make sure there is no underlying issue which could resurface in the future.
Giancarlo AmatiGiancarlo Amati
Unfortunately, I didn't have any debug log active at that time, so I don't think there is anything I can inspect anything. 

Regarding the workflows, they have a third option in the criteria: 'created, and any time it's edited to subsequently meet criteria' which my understanding that once it's met the first time then it does the action but it's not triggered at every editing of the record. 

The initiation criteria of the workflow don't seem working like that. The option is not available unless I add it in the conditions.
Thank you,
GC