API Rules

An API Rule is used to apply validations to records based on custom codes written in JAVA or JavaScript. APIs are written to create event-based enhancements and custom validations. 

Users have the capability to write Standard APIs which are applicable to all the tenants on the cloud server for a specific module. Users can also write custom APIs that are valid for their own tenant for a specific module. These codes can be written as enhancements, which can further be added to this rule. 

 To configure an API Rule within a module:  

  1. Click on the Settings icon at top right corner on the Home page. 
  2. From the left menu bar, select Modules. 
  3. Select the module > Business Rules > Schema. 
  4. Identify the desired schema and click on Detail > Add Business Rule. 
  5. Under Rule Type, check API radio button. 
  6. Click Next. 
  7. Enter the name of the rule in Description.   
  8. Select the preferred Category for the rule. 
  9. In the Reference field, select the existing API. 
  10. In the Message field, add a message that would appear if the record is not in    accordance with the API. 
  11. Select Finish.   

 For more information on how to write API’s in MDO, follow this link: API Framework