Hi,
I am trying to access in a suitelet, the check boxes under the subscirptions tab on a Contact record.
The goal is to provide the "check" and "uncheck" functionality on the checkbox based upon the user action.
The problem that i am facing is that once any of the subscription flag is set to "F" i am not able to set its value to "T".
This is the same behaviour that happens when i try to do it using the NS Contact Form.
Below is the code that i am using to access the checkbox and to set its value to "T".
var subscriptionsCount= loadedContactRecord.getLineItemCount('subscriptions');
try{
for(var i=1;i<=subscriptionsCount;i++)
{
if(loadedContactRecord.getLineItemValue('subscriptions', 'subscription',i)==4){
loadedContactRecord.setLineItemValue('subscriptions', 'subscribed', i,'T');
}
}
nlapiSubmitRecord(loadedContactRecord, false);
Please help!
Thanks
PS:You might see some extra spacing in the word 'subscriptions' in above code. But this is only happening while posting it here.