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
Somasundaram SubramanianSomasundaram Subramanian 

how to prompt no approval condition

when the approval process is not fall in any condiiton when user submit the approval it submi and reject immediately , 
how to prompt user that no condtion falls and system should not submit the approval any idea?
Shri RajShri Raj

To prompt the user that no approval condition has been met, you could write a custom validation rule that checks the conditions of the approval process and returns an error message if none of the conditions are met. Here's an example:
Create a custom validation rule on the object associated with the approval process.
In the validation rule, use the Approval object's API to retrieve the conditions of the approval process.
Use an IF statement to check if any of the conditions have been met.
If none of the conditions have been met, return an error message to the user, indicating that the approval process cannot be submitted.
Here is an example of what the validation rule might look like:

IF (Approval__c.Conditions__c = 0) {
  return Error('No approval conditions have been met. Please correct your record before submitting for approval.');
Somasundaram SubramanianSomasundaram Subramanian
is it in built functionality if the approval condition not fall system will submit and reject automatically?

I have IQ Quote object and the submit button is in Approval History , where do i write validation rule?