You need to sign in to do that
Don't have an account?
Adding a line item to an opportunity in a flow
I am trying to have my flow add a line item to an opportunity based on input from a dynamic choice drop down with all the products.
I am using record create and OpportunityLineItem:
opportunityid equals a variable that contains the appropriate opportunity id number
PricebookEntryId equals dynamic choice of the products
Quantity equals 1
When I try to run the flow, i get the following error message:
Encountered unhandled fault when running process Beginning_of_Renewal_Process/301c00000004EfV exception by user/organization: 00Dc00000001coI/{4} Source organization: 00D80000000dqvZ (null)
interaction.sfdc.adapter.rules.SalesforceRuleBrokenException: UPSERT --- UPSERT FAILED --- ERRORS : (FIELD_INTEGRITY_EXCEPTION) field integrity exception: TotalPrice (total price must be specified) --- for SFDC record with ID : null,
caused by element : Data update.Add_line_item_to_newly_created_opportunity
caused by: interaction.sfdc.adapter.rules.SalesforceRuleBrokenException: UPSERT --- UPSERT FAILED --- ERRORS : (FIELD_INTEGRITY_EXCEPTION) field integrity exception: TotalPrice (total price must be specified) --- for SFDC record with ID : null,
Is there an easy fix for this or am I going about this completely the wrong way?
Thanks for any advice!
For OpportunityLineItems (Opportunity Products in the UI), you need to set either the TotalPrice or the UnitPrice. Here is a link the the Apex object description of Opp Line Items. http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_opportunitylineitem.htm
All Answers
Is the TotalPrice field required?
For OpportunityLineItems (Opportunity Products in the UI), you need to set either the TotalPrice or the UnitPrice. Here is a link the the Apex object description of Opp Line Items. http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_opportunitylineitem.htm
This helped and I was able to get it! Thank you!