Tuesday, February 19, 2019

Subtract Months on Custom Field Base on Another Date Field

User wants to create a custom field where the value is x number of months subtracted from another date field. For example, custom field value (Expiration Date) should be one month prior to the date of purchased.

To create the custom field, perform the following steps:

     1. Navigate to Customization > List, Records, & FieldsTransaction Body Fields > New.
     2. Provide a Label (e.g. Expiration Date).
     3. Set Type to Date.
     4. Uncheck Store Value.
     5. In the Applies To tab, check Sale.
     6. In the Display tab, set Subtab to Main.
     7. In the Validation & Defaulting tab, set the following:

  • Default Value : add_months({trandate},-1)
  • Formula is checked

     8. Click Save.

No comments:

Post a Comment