+ Start a Discussion

working of assignmentRulHeader


I've got a php import script, which moves data from webserver to salesforce.

Some data needs assignment rules during import and some not.

I have only one client for the whole script


$sf = new SforceEnterpriseClient();

 and I enable my default assignment rule


$useAssignmentRule = new AssignmentRuleHeader(null , true);

 for an import function.


I'd like to know, what happens after setting the assignment rule. Is it valid for the whole script lifetime?

I thought, it doesn't but seems it does..

I recognized, that some other following import functions use the assignment rule as well and I don't need that. I just need enabled rule for some exceptional import cases.

How can I disable the assignment rule after the success exceptional import?







Tran ManTran Man

Yes, unfortunately the toolkit was written to scope the assignments at the connection level.  You would have to reinstantiate your connection or patch the toolkit to clear the assignment.


I've found another solution.

I can open more sessions with different assignment rules and depending on required function, I can use different clients for calling API methods.