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
viktorVviktorV 

working of assignmentRulHeader

Hi,

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);
$sf->setAssignmentRuleHeader($useAssignmentRule);

 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?

 

Thanks,

Viktor

 

 

 

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.

viktorVviktorV

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.