anusha(salesforce developer)

Monday 18 July 2016

Process Builder Sandbox vs. Production

problem:
            I've created a process in Process builder to coincide with a workflow. The idea is to create a new opportunity ( time based ) once the criteria is met after the workflow has been triggered. For example,
Workflow automates a process to send email alert 275 day from close date. The workflow also updates a field labeled "Renewal Reminder Sent" to True. The process builder criteria is set to match the workflow criteria but to make it time based I added field "Renewal Reminder Sent" = True , I've also added another custom field to have the process builder run once.
The Sandbox works flawlessly, but the production does not work. It doesn't create/clone an opportunity - although the workflow works fine. I've checked the field security and compared it to the Sandbox all good. I use the same account on both instances. What am I doing wrong here? BTW :the Process builder works if I manually edit and save the record when the "Renewal Reminder Sent" is set to True.
But the Sandbox does it automatically as soon as the workflow updates the field, the process builder also initiates the create record action without me having to touch the record.
I deployed everything from the Sandbox to Production using outbound set changes.
solution:
  1. Choose Object (Opportunity) and Specify When to Start the Process when a record is created or edited. Checked! Allow process to evaluate a record multiple times in a single transaction? Yes
  2. Filter Conditions* ( Select your Criteria ) Any of the conditions are met (OR) Checked for me since I only had to 2 fields. both were Closed Won Stages Do you want to execute the actions only when specified changes are made to the record? Yes
  3. Scheduled Action (Time Based Action will now be available). Set your time based action ( For me was 275 days from closed date )
  4. Create another action under it and select "create record" Select the fields you would like to Pre-Populate to include when the new opportunity is created. Since Close date is a REQUIRED field, I created a Formula based field that outputs a new date for Next renewal date which would be Todays Date. Since the business requirements is always 90 days before the anniversary, My Date formula Field looks like this "CloseDate + 275" which I assigned to the "new close date for the new opportunity created".
Remember this is a time based Renewal. So every renewal that closed 275 days from todays date will trigger a workflow and process for Today..
I still don't understand the difference between the Sandbox and Production evaluation period, but In my opinion the transaction time on the Production is a lot slower than the sandbox and thats why the earlier approach didn't work..,I could be wrong, but I've tried every possible option to get both methods to work..no dice. Anyway, I hope this will help anyone that needs similar logic. Key point is "Scheduled Action" from the process NOT based on a field update by a workflow or "Allow process to evaluate a record multiple times in a single transaction" checked. It will not work.

No comments:

Post a Comment