1

I have created a flow that creates a pricebook entry for new products (based on a custom field on the Product object), however when I debug the flow it comes up with the following quite generic error:

FIELD_INTEGRITY_EXCEPTION: field integrity exception.

I cannot work out what I am doing wrong. I have reduced the flow to three steps:

  1. Start
  2. Assignment: recNewPriceBookEntry
  3. CreateRecord (base on reNewPriceBookEntry)

The full output of the final step that causes the error is:

FAST CREATE: Create_New_Price_Book_Entry

Create PricebookEntry records using the values that are stored in {!recNewPriceBookEntry}.

Variable Values

[IsActive=true,Product2Id=01t25000003Hfy8,UnitPrice=1200,UseStandardPrice=true,Pricebook2Id=01s58000001nQb8]

Result

Failed to create records.

Error Occurred: This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: field integrity exception.

I have also tried using the 18 character IDs (01t25000003Hfy8AAC & 01s58000001nQb8AAE), which results in the same error.

As this is a fresh sandbox, there are no entries in the Price Book Entry object (I double checked that with Developer Workbench).

If anyone can tell me what I am doing wrong that would be very much appreciated.

3
  • Do you have multicurrency enabled? Are you sure they are the correct ID values for that org? – sfdcfox Feb 28 '19 at 12:27
  • 1
    UseStandardPrice field value can not be set to true on insert. – Rohit Patil Feb 28 '19 at 12:39
  • Removing the UseStandardPrice field from recNewPriceBookEntry solved the problem. Thank you so much for your help. – Kees Feb 28 '19 at 13:40
1

Rohit Patil's comment solved the problem:

UseStandardPrice field value can not be set to true on insert.

I removed the UseStandardPrice field from recNewPriceBookEntry and it started working.

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.