

file: String: The file path which contains the logic hook class. beforesavecandidate, //The PHP file where your class is located.
SUITECRM LOGIC HOOKS CODE
description: String: A description of the logic hook to be installed. custommodulesTaskslogichooks.php file contains the following code Here is an example of how to lock editing of a record based on a field value. While there isn’t any built in framework in SuiteCRM we can achieve similar results by using javascript.The advantage of using javascript versus a logic hook is we handle the logic while the user is interacting with the edit form and can also display information to the user on why the action isn’t allowed. SugarCRM 7 makes this fairly easy either by using the calculated field functionality or within the Backbone framework. For example it is easy to make a field required in Studio but you cannot make it required based on the value of another field such as forcing the description of a Lead to be filled in if the status moved from New. Some of these customizations can be done in either the UI or some simple vardef field definitions but we are limited in what we can do. A couple of examples are forcing a field to be filled based another field value, updating a field based on the input of another field, or locking editing of the record based on a field value. The first check is the same sort of thing done above with the Attendees Activity Stream hook, checking to see if this is. A common customization for SuiteCRM is controlling the user behavior while editing records.SUITECRM LOGIC HOOKS HOW TO