You need to sign in to do that
Don't have an account?
Shrew Designs
Setting Assignment rules from Batch API
Hello,
We are funneling leads in using the Batch API from a Ruby On Rails platform. When the leads come in our assignment rules do not fire. We tried creating a trigger to update the useDefaultAssignmentRules but this did not help. I have verified in the debug logs that the trigger is firing, but it does not send the leads through the assignment rules. All leads are assigned to the user who's Security Token is being used.
Any Ideas? Below is the trigger we are using:
trigger SetAssignmentRuleOnLeadInsert on Lead (before insert) { for(Lead theLead : Trigger.New){ Database.DMLOptions dmo = new Database.DMLOptions(); dmo.assignmentRuleHeader.useDefaultRule = true; theLead.setOptions(dmo); } }
maybe this will help......
http://boards.developerforce.com/t5/Apex-Code-Development/Trigger-to-Fire-Lead-Assignment-Rules-Does-not-Fire-them/td-p/150720