Create a Record in flow designer throws up an error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 03:27 AM
I am trying to look up for an existing customer account using the Salesforce ID provided in the catalog form. If there is an existing customer account, I just update those records with few field values. Whereas, if the customer account is a new account I am trying to create a record in customer_account table using a flow designer. Everytime, there is a new record flow designers throws up an error while creating a record. I am running this flow as a system user.
Help me understand what needs to be done to resolve this.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 05:48 AM
@haripriyat82638 Please check if there is any business rule defined on your customer_account table which is preventing creation of a new record using current.setAbortAction(true)l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 06:18 AM
Currently there are no BR's which are trying to setAbortAction(true)l on customer_Account table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 08:31 PM
@haripriyat82638 Did you try to set the Run As System on the flow properties? This will make the flow run as system hence the ACL won't be an issue for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2024 10:06 AM
Hi Mark,
I found the issue and now the flow is fixed.
Cause:
Looks like our organization is creating customer account records by importing data from other instances, which made the account code values out of sync. Because of the mismatch of these values I was getting an error while creating a new account as below:
java.sql.BatchUpdateException: Duplicate entry for key account_path
Fix:
- I Determined the account code for the last created account. By Adding the Account code field to the list view of the customer_account table and sorted it to find the latest update.
- Navigated to the System Property [sys_properties] table.
- Set the com.snc.cs_base.last.generated.code.tree.path property to the value determined in step 1 if it is not the same.