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
Karim BAHAJIKarim BAHAJI 

Inserting leads and assignment rules with Jitterbit

Hi,

Could someone tell me how i can get lead assignment rules when I am inserting new leads records with Jitterbit?

Thanks
Best Answer chosen by Karim BAHAJI
Shikha AgashiShikha Agashi
You need to write trigger for before insert and using DMLOptions class you can trigger assignment rules. For Eg:

for (Lead l: trigger.new()){
database.DMLOptions dmo = new database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule = true;
l.setOptions(dmo);
}