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:41 AM
Can you manually create the new record?
Please check on all the ruling when creating a new record. Something is needed for the record to be created, and the flow doesn't provide that. Your flow is OK, the error is in creating of the record itself.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 06:18 AM
Yes, You are right I am unable to create a record manually if I enter some value in the salesforce ID field. I see that there is a write ACL present on this particular field. I inactivated that ACL but still not able to create a record in customer account table. If I am just entering a name and marking the active field as true, the record is getting created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2024 05:27 AM
Check all logic: business rules, mandatory fields, data policies, other ACL limitations. If you can't create the record and the flow also can't, than you have some customization on the table that prevents you from creating it. This can be lots of things, but You are the only one that can check. Do you have any 'before' business rules that ask for something you aren't doing?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2024 10:07 AM
Hi ,
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.