Discussions
custom field for expense dates
I am trying to create a script that will copy the expense date into the line of each expense entry, since the default field is currently not available for reports/saved searches. Here's the script I have so far, but it's not working.
function enterDate
{
var date=nlapiGetCurrentLineItemValue(type,'expensedate');
nlapiSetCurrentLineItemValue(type,'custcol1',date,true,true);
}
Any ideas what I'm doing wrong?
Also, I did just a simple thing by creating the custom field (custcol1) and having the default value/formula = {expensedate} and not storing value. this worked as it showed the values on screen, but when I go to use this field in a saved search, it says Error: Field Not Found! Argh!! This tells me the field is accessible to some degree, just not for any purpose of value!