Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
global interface send2crm.FormValidator {
    
    /**
     * Determine whether form data is valid and should be processed.
     * @param data The parsed form object with field values.
     * @return True if the form should be processed, false to cancel.
     */
    Boolean isValid(send2crm.FormData data);

}
Note

Implementation If using a public Site for the Send2CRM API, implementing classes should use global inherited sharing, because form validation occurs during anonymous calls to public endpoints. The context user is that configured in the Salesforce Site.

...

To use the validation for a form mapping, it needs to be available in the Validator (send2crm__Validator__c) picklist on the send2crm Send2CRM Mapping object. The API name must be the exact name of your validation class, including namespace if applicable.

...