on 10-24-2018 9:15 AM
Dear experts,
Currently, I create new Opportunity by using CreateWithReference function like this
var opportunity = this.BusinessTransactionDocumentReference.Opportunity.GetFirst();
if(opportunity.IsSet())
{
var newOpportunity = Opportunity.CreateWithReference(opportunity)
}
After that, I want to create new Sales Quote belong to newOpportunity with clone data from an exist Sales Quote. I tried to use
var newSalesQuote = CustomerQuote.CreateWithReference(currentSalesQuote);
The new SalesQuote is created with clone data from exist Sales Quote but I cannot assign OpportunityID to newSalesQuote because it throws read-only error.
How can I assign OpportunityID to newSalesQuote or how can I create new SalesQuote from an Opportunity with clone data from exist Sales Quote?
Thanks a lot for your support!
Regards,
Huy-Nguyen
Hi Huy-Nguyen
Try and use an elementsof key word and build the structure of the Sales Quote (including the Opportunity ID) before you Create With Reference.
Cheers
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.