Thursday, March 21, 2019

Field Validation using Workflow

Field Validation Sample:
Date field should be not less than today's date, should the value entered not today, Date field should be set automatically for today's date.

(1) Create a Workflow with the following details:
 - Record Type: Transaction
 - Sub Type: Journal Entry
 - Execute as Admin : Checked
 - Release Status: Released
 - Event based:
 -- On Create: Checked
 -- On Update: Checked

 (2) Create New State
Name: Entry

(3) Create new Return User action that will notify the customer regarding the error.
- Trigger On: After Field Edit
- Client Fields: Date
- Formula : (nlapiDateToString(new Date(nlapiGetFieldValue('trandate'))))< nlapiDateToString( new Date() )
- Text: You are not allowed to select the date less than today's date.

(4) Create new Set Field Value action to automatically set Date to today's date when customers input is less than today.
- Trigger On: After Field Edit
- Client Fields: Date
- Formula : (nlapiDateToString(new Date(nlapiGetFieldValue('trandate'))))< nlapiDateToString( new Date() )
- Field: Date
- Value Date: Today

No comments:

Post a Comment