function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priya MishraPriya Mishra 

Getting error while submitting the form

Hi All,

when a user is trying to submit the visualforce page he is getting this error what can be the resion to solve this issue.

error
Thanks in advance.
Khan AnasKhan Anas (Salesforce Developers) 
Hi Priya,

Greetings to you!

According to Salesforce knowledge article (https://help.salesforce.com/articleView?id=000239860&type=1):

This error can show up when saving a record, running an apex test class manually or via deployment and performing and insert/update through the API.

Here are the various options that will help you understand the cause for the error,
  • Error Email:  Creator of the flow would have received an error email with detailed step by step information and error message. Great way to see if the issue could be data or implementation related.
  • Capture debug logs, (make sure to set debug level as FINEST for workflow) Sometimes the debug log will tell you exactly which element of the Flow is failing and why is it failing.
  • Use debug screen where you can display Request and Response details, press Ctrl + Shift + M (on a windows PC) or command + shift + M (on Mac) inside the flow designer.
  • Use Workbench REST Explorer to capture more details about process/flow metadata.

1. Get the version Id from the error message
2. Login to Workbench
3. Go to Utilities > REST Explorer >> Perform a GET 
4. Add the following to the URI field and change the Id with the FlowId you are investigating /services/data/vXX.x/tooling/sobjects/flow/30124000000PcNDAA0  [NOTE: vXX.x refers to the API version and as new tooling API features are released, use the latest version] 
5. Click Execute
6. Open the 'attributes' folder
7. Check the 'ProcessType', if the value is 'Flow' then this is a normal flow, if the value is 'Workflow', this is a Process. Here you can also see the MasterLabel, which should provide you with the name of the flow/process.
8. Explore the Flow Metadata tree to see what a specific element is doing, this is more useful when it's a Process Builder Flow since the error email and other error messages sometime refer to the auto-generated name like myRule1_1. 

NOTE: Executing a DELETE in REST explorer will in fact delete the flow if inactive. Please be careful when using DELETE option in REST Explorer.