Process Definition - How to check for an empty datetime field

I want my Process Definition to check if, when creating a new record or editing an existing record, a user has filled in a datetime field. If they have, the Process will leave the entered date. If they have not, the Process will put in a calculated date based on the Created On datetime.

How can I check whether the field is empty? Is it simply <field> before '2000-01-01 12:00 AM'? Is there a better way?

Parents Reply
  • Hi Steve Jaspar,

    You can do that through code customization in vardefs.

    If you are familiar with the sugar development, you can set the field "enforced" property to false and it would become editable for the end-users.

    For eg:

    Navigate to field vardefs file, create it if doesn't exist.

    <root_directory>/custom/Extension/modules/<module_name>/Ext/Vardefs/sugarfield_<field_name>.php

    //set enforced to false

    $dictionary['<module_class_name']['fields']['<field_name']['enforced'] = false; //where <module_class_name> is generally singular for standard modules i.e. "Account" for "Accounts" but for custom module, it is the same as module name.

    Perform Quick Repair & Rebuild from the Admin -> Repair section.

    Let us know if this helps.

    Regards

Children