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
kalai siva 8kalai siva 8 

triggers to share opportunity line items salesforce to salesforce

triggers to share opportunity line items salesforce to salesforce
Andrew EchevarriaAndrew Echevarria
Here's documentation on how to share items on Salesforce through an Apex Trigger:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm
Andrew EchevarriaAndrew Echevarria
Someone appears to have found a workaround:
https://success.salesforce.com/answers?id=90630000000gmsDAAQ

You'd have to share the opportunity and select the line items. 
kalai siva 8kalai siva 8
hi Andrew Echevarria i cannot able to share the opportunity lineitem one to another org ussing trigger 
 
kalai siva 8kalai siva 8
  RelatedRecords = 'OpportunityLineItem' shows errors
Andrew EchevarriaAndrew Echevarria
Right, you have to share only the Opportunity, and select the associated line items using Salesforce to Salesforce. Take a read at the link I posted, it should be helpful. You don't need to use Apex, check the link on Salesforce to Salesforce below.
https://developer.salesforce.com/page/An_Introduction_to_Salesforce_to_Salesforce
Andrew EchevarriaAndrew Echevarria
Unfortunately that's not possible right now. I'd recommend maybe suggesting it as an Idea on the Success Community and it may be resolved in the next release!