I need to Show Error Message for the user in the User interface when process on create record action fails. Currently it just says 'Action completed' whether the process is success or failure. User is unable to know if the record is successfully created or not.
Discussion posts and replies are publicly visible
If you are calling process from record action or related action.To show custom error messages when a record action fails, prevent the default "Action completed" message from appearing by ending your process with a chained User Input Task instead of an End node. After your Write Records node, add an XOR gateway to check success/failure and store the result in process variables. Enable activity chaining from Start through all critical nodes to the final User Input Task, which displays an interface showing either "Record created successfully!" or your specific error message based on the process variables. Since the process ends with a user interface rather than completing normally, the generic "Action completed" message won't appear, and users will see your meaningful feedback instead.If you are calling process from interface,When using a!startProcess() to call a process from an interface, you can directly handle success/failure using the onSuccess and onError parameters.
a!startProcess( processModel: cons!YOUR_PROCESS_MODEL, processParameters: {record: ri!record}, onSuccess: { a!save(local!message, "Record created successfully!") }, onError: { a!save(local!errorMessage, "Error: Failed to create record") } )