Friday, September 14, 2018

Create a Field that Computes the Number of Days a Purchase Order Stays at a Certain Status


User needs to have a custom field computes the number of days a purchase order stays in a certain status (Pending Receipt or Pending Billing).  Once purchase order is fully billed, then custom field should show zero days.

To accomplish this, perform the following steps:

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

  • Default Value : CASE WHEN {status} like '%Pending Receipt%' then (ROUND(({today} - {trandate}),0)) WHEN {status} like '%Pending Bill%' then (ROUND(({today} - {trandate}),0)) ELSE 0 END
  • Formula is checked

     8. Click Save.

No comments:

Post a Comment