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
SaaspertSaaspert 

Case number issue during S2S (Externally sharing Cases via Salesforce to Salesforce)

Here is the scenario :
there are two orgs Org#1 and Org#2

Org#1. Self Service Org (used by customers to browse knowledge , open cases , view cases etc)

Org#2. Internal Support Org (used by support reps)

When a customer creates a case in Org#1 that case is copied over to Org#2 via S2S,
all case fields are copied over to Org#2 except the Case Number,  
In both orgs the Case number is an "auto number" field hence two different case numbers are generated in both orgs.

is there anyway I can get case number generated in Org#2 copied over in Org#1 ?

attempted solution: I created a custom field on Case Object in Org#1 to store Case number from Org#2 and updated S2S mapping to publish case number from Org#2 to Org#1, but the issue is unless the case record is modified in Org#2 , custom field in Org#1 is not updated with Org#2 case number.

is it possible to get the case number from Org#2 to Org#1 w/o modifying case in Org#2 ?

Please let me know if there are any other approaches like getting Case number from Org#2 via Web Service or something else.

Thanks!
Best Answer chosen by Admin (Salesforce Developers) 
SaaspertSaaspert
the best and workable solution was to do fake update on case in after insert trigger in org#2 by calling a method having @future annotation. Case number from Org#2 flows back to custom field in Org#1 in about 1-2 mins.
Message Edited by Saaspert on 02-11-2010 11:20 AM

All Answers

SaaspertSaaspert
the best and workable solution was to do fake update on case in after insert trigger in org#2 by calling a method having @future annotation. Case number from Org#2 flows back to custom field in Org#1 in about 1-2 mins.
Message Edited by Saaspert on 02-11-2010 11:20 AM
This was selected as the best answer
adi kurugantiadi kuruganti

another option (in addition to the Apex trigger @future method) is using time based workflow. You could trigger a tbw on insert in Org 2 that updates the case (dummy update) that in-turn will update the case number (mapped to custom field) in org 1.

hxnhxn

Check out AppExchange app Hubcase for Salesforce. It sends back a reference case id of org2 back to org1. Also, it allows you to escalate or share cases to partners not using salesforce as well as those who are using salesforce. Clean separation of your customer interactions from partner interactions.