This topic contains 2 replies, has 0 voices, and was last updated by tect22 7 years, 8 months ago.
-
AuthorPosts
-
ryan.austria- Contributions: 0
- Level 1
- ☆
I have a script for Vendor Payment and I want to fet the value (‘tranid’) of Vendor BIll and apply it to Vendor Payment printout. I tried so many times but I got a result of null or undefined.
Code:
Code:
var apply = record.getLineItemCount(‘apply’);for (var x=1; x< =apply; x++){ var date = record.getLineItemValue('apply','applydate',x); var type = record.getLineItemValue('apply','type',x); var amount = record.getLineItemValue('apply','due',x); var refnum = record.getLineItemValue('apply','refnum',x); var memo = nlapiLookupField('vendorbill','apply','memo',x); layout += '
‘;
layout += ‘‘+iE(date)+’ ‘;
layout += ‘‘+type+’#’+iE(refnum)+’ ‘;
layout += ‘‘+memo+’ ‘;
layout += ‘‘+addCommas(amount)+’ ‘;
layout += ‘‘;}
This is a cached copy. Click here to see the original post.
Chuan Zhuo- Contributions: 0
- Level 1
- ☆
View source HTNL code of NS vendorpayment page,
you might found the correct column internalid there.
tect22- Contributions: 0
- Level 1
- ☆
Hi Ryan,
I’m assuming you want to show the memo of the Bill, your Bill Payment is applying. Try this code.
Code:
var apply = record.getLineItemCount(‘apply’);for (var x=1; x<=apply; x++){
if(record.getLineItemValue('apply','apply',x)=='T' ){
var date = record.getLineItemValue('apply','applydate',x);
var type = record.getLineItemValue('apply','type',x);
var amount = record.getLineItemValue('apply','due',x);
var id= record.getLineItemValue('apply','internalid',x);
var refnum= record.getLineItemValue('apply','refnum',x);
var memo = nlapiLookupField('vendorbill',id,'memo');
layout += '‘; layout += ‘ ‘+iE(date)+’ ‘; layout += ‘
‘+type+’#’+iE(refnum)+’ ‘; layout += ‘
‘+memo+’ ‘; layout += ‘
‘+addCommas(amount)+’ ‘; layout += ‘
‘; } }
AuthorPostsYou must be logged in to reply to this topic.