Question:
Search Partner Record related a Promotion Code
Answer:
You need to execute a search againts Record Type called Partner. Below is a sample script for reference:
var filters = new Array();
//Internal ID of the Promo Code
filters[0] = new nlobjSearchFilter( 'promotion', null, 'anyOf', 3);
var columns = new Array();
columns[0] = new nlobjSearchColumn( 'promotion' );
columns[1] = new nlobjSearchColumn( 'code' );
columns[2] = new nlobjSearchColumn( 'internalid' );
var results = nlapiSearchRecord('couponcode', null, filters, columns);
The above script will return the Partner record associated with the Promotion Code.
No comments:
Post a Comment