Groovy Support to Make Reject Reason and Comment Fields Mandatory
You can use Groovy scripts to specify rules to force both the Reject Reason and Comment fields to be set as mandatory fields for your lead records.
The following is a sample of code to insert before the Lead update trigger to ensure that salespeople enter a reject reason and a comment for the lead:
if ((RejectReasonCode == null || RejectReasonCode == ''))
{
throw new oracle.jbo.ValidationException('Reason is Mandate')
}
else if (RejectComment == null || RejectComment == '')
{
throw new oracle.jbo.ValidationException('Comment is Mandate')
}
else
return true
For more information about Groovy scripting, see the Oracle Applications Cloud Groovy Scripting Reference.