You need to sign in to do that
Don't have an account?
mustapha L 1
SyncedQuoteId read only field ?
Hi there,
my project is the next i'm looking to AUTOmatically SYNC a quote (to its opportunity) as long as the status of the Quote is "Accepted"
i did Trigger for that which "in therorie" should answer to the need, but for unknown reason it seem that the fireld is "SyncedQuoteId " is readOnly:
trigger QuoteAutoSync on Quote (before update) {
for (Quote q : Trigger.New) {
//check if the Status of the quote is Accpted, if yes the quote is sync to opportunity
if (q.Status == 'Accepted'){
Opportunity opp = new Opportunity();
opp.id=q.OpportunityId;
opp.SyncedQuoteId = q.Id;
update opp;
}
}
}
is this something that we can change or it is a stuff fixed once for all by SalesForce ?
Thnaks
my project is the next i'm looking to AUTOmatically SYNC a quote (to its opportunity) as long as the status of the Quote is "Accepted"
i did Trigger for that which "in therorie" should answer to the need, but for unknown reason it seem that the fireld is "SyncedQuoteId " is readOnly:
trigger QuoteAutoSync on Quote (before update) {
for (Quote q : Trigger.New) {
//check if the Status of the quote is Accpted, if yes the quote is sync to opportunity
if (q.Status == 'Accepted'){
Opportunity opp = new Opportunity();
opp.id=q.OpportunityId;
opp.SyncedQuoteId = q.Id;
update opp;
}
}
}
is this something that we can change or it is a stuff fixed once for all by SalesForce ?
Thnaks
Hope this helps.
All Answers
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunity.htm
Hope this helps.
MANY THANKS , it exactly does what i need.
i will have to work to make some "security" to ensure our sale do not flag more than 1 quote as accepted to avoid any unexpected state now.
Once again many thanks