Salesforce-to-salesforce round trip field update issue -
I had to integrate an S2S, but it has been a double release, but I have an unexpected problem which is expected That someone
I have two orgs, sharing contacts on S2S.
The contact in each organization is the same schema, this is the standard field and custom field. I have repeated a base case with just two custom fields: checkbox field A, and number (18,0) field B.
The organization publishes Field A, and subscribes to field B.
Organization 2 subscribes to Field A, and Field B publishes.
Organization 1 Starts all S2S workflows by sharing contacts on OR2 on S2S Organization 2 has automatically accepted.
Before establishing a trigger, Organization 2 has a contact, which uses Field A to calculate the value of Field B. Example If field A is checked, populate Field B with 2, if unchecked, 0. (This is definitely a huge sur-simplification that I really need to do, but this base is copyable.)
All work in ORG2 is fine - contact with field A Come right, and I think the result of the field is calculated in B.
The problem is that the result - field B - automatically shared back to organization 1 until the next contact update. It can be as simple as I am editing a non-shared field like "description" on that statement, such as in organization 2, and then I pushed back the calculated value before field B back to ORG1.
I am assuming that this is because, before calculating the field B, the S2S connection assumes that the existing update transaction is done only by itself (I can see How it can stop the infinite S2S update loops).
I first tried to create a workflow field update, which was forcibly updated (new, dummy) field, when Field B changed, but it still does not give the reason for backflow Probably because it is in the context of a single execution that is exempt from the redistribution of Salesforce. Apart from this, a workflow rule was attempted, which forwarded the lead back to the connection queue while changing the field, and it also does not work.
Then I tried to update the update in an up-update trigger - if the shared field is updating, reloading, and updating the updated object. It also does not work
I got a solution, which is a futures method called by after updating trigger which reloads and touches any record which was earlier a shared field replaced by the updating trigger. This causes regional results to be shown in the organization in near-real time.
This solution works for me right now, but I think I should remember something.
Do anyone have more elegant solutions for this?
I think there is no good work, so what are you doing to the limitations of future callouts Has been extended to a very high level, which should not worry you.
What you can do (not sure that it is still in the same context as it will work) - Organization 1 - Field A has been updated, the contract is published
Organization 2 - Before updating of contract in Organization 2; If someone has been updated - Save the contract id in the new custom object. After the update of the new custom object, updates will be published on the update field BB for the given contract id
Comments
Post a Comment