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
Nithya S 1Nithya S 1 

Lead assignment rules causing WF updates to be called

Hi all,
We have lead inserts being done using data import wizard and we choose the lead assignment rule that needs to be assigned.
This is inturn updating the owner on the lead and calling ALL workflows (even though they do not meet the criteria) under lead object which is causing a limit exception - time out.

Is there a way out for this?

Regards
Nitty
Amit GhadageAmit Ghadage
Hi Nithya S 1,
Can you deactivate workflow rules?
SwarnaSankhaSinghSwarnaSankhaSingh
Hi Nithya,

For us to troubleshoot the issue of "ALL workflows (even though they do not meet the criteria) under lead object" will not be possible unless we get access to your Org.

What you can do is while using the Data Import Wizard, is to uncheck the checkbox which says "Trigger workflow rules and processes for new and updated records" and that will ensure that no Workflows are not triggered. This would be far more convenient than you deactivating the workflow rules.

Just in case you see that on selecting the first section for "Add new records", the checkbox stating "Trigger workflow rules and processes for new and updated records" is selected by default but is inactive & greyed out, then follow these simple steps to have the checkbox unchecked:
  • Click on the next option for "Update existing records"
  • You will see the checkbox selected but it will be editable.
  • Click to uncheck the box
  • Now go back the "Add new records" section and you will see the checkbox is no longer checked.
I hope this helps you solve the problem at hand; please do let me know how it works out for you. If you feel that your question was answered then do flag the appropriate answer as the solution to your query.

Kind Regards,
Swarna.
Nithya S 1Nithya S 1
@Amit - Thank you.. But, we cannot inactivate the Workflows @Swarna - Thanks for the response. By all workflows, I mean it goes through each of the WFs with the WF_CRITERIA_BEGIN. But never really "runs" the WFs because the criteria don't match. From the logs for instance - 06:20:57.987 (55029808510)|WF_CRITERIA_BEGIN|[Lead: 00Q3B000003gFjt]|Update Email|01QC0000000J4DN|ON_ALL_CHANGES|0 06:20:57.987 (55029840648)|WF_RULE_FILTER|[Lead : Last Name not equal to ] AND [Lead : Lead Record Type equals Deal Lead] 06:20:57.987 (55029942109)|WF_RULE_EVAL_VALUE| 06:20:57.987 (55029945640)|WF_CRITERIA_END|false This should ideally trigger only for records that have the Record type as "Deal Lead". The records that we are inserting is of a different record type. Likewise, I see many other WFs that are being triggered which I think is occurring due to the Lead assignment rules. As you've mentioned, when I click on the add new records button, I have to choose the assignment rule that these records will be associated to for the owner to be updated.I pick the rule name and I uncheck the "Trigger workflow rules and processes for new and updated records". But when I clicked on Import, I got an error "API Lead Name is not supported". This I read was due to the Lead Owner field being present in the csv file. I tried unmapping that as well. But it didn't work. Got the same error. On the other hand, when I checked back the box, the import started but was unsuccessful due to the time limit. Also, I can import leads if I don't select the assignment rules that they'd have to be assigned to even if I leave the "Trigger workflow rules and processes for new and updated records" checked. So, it seems like the assignment rules is triggering off the Workflows. Regards Nithya
SwarnaSankhaSinghSwarnaSankhaSingh
Hi Nithiya,

I understood your point on "ALL workflows"; just that I wanted to clarify that unless we have an access to your org, it would be difficult for us as in the community users to troubleshoot and pin-point the issue.

Can you share the template you are using with a few dummy records so I can try to process it in my Dev org?

Kind Regards,
Swarna.
Nithya S 1Nithya S 1
Hi Swarna, Attached is the template that is being used with a few sample records. Thanks!
SwarnaSankhaSinghSwarnaSankhaSingh

Hi Nithya,

I do not see the template attached to the comment. Can you email it to golden.dev.coder@gmail.com?

Kind Regards,
Swarna.

Nithya S 1Nithya S 1

Hi Swarna,
I did send it.
 

Regards
Nithya