Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
How to validate fields on item fulfilment form
Hi ,
We have two custom fields in item fulfilment line level (Start date and End date), I want to validate both the dates should not be same.
I tried below , somehow it is not giving the alert when both are same.
function validateLine()
{
var GetRecord = nlapiGetRecordType();
if (GetRecord == 'itemfulfillment') {
var startdate = nlapiGetCurrentLineItemValue('item', 'custcol_contract_start')
var enddate = nlapiGetCurrentLineItemValue('item', 'custcol_contract_end')
if (startdate == enddate)
{
alert('Contract start and end should be different');
return false;
}
return true;
}
}
I thought of using workflow , But the above custom fields are not available for comparison(Actions used : Confirm, Show message. Both didn't work for me)