Discussions
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Custom Field Update Failed
Hi,
I'm having trouble updating my custom field using Suitetalk.
Below is the part of my code:
$InvoiceId = $_GET['tranid'];
$InvoiceRecord = new nsComplexObject('Invoice');
$BooleanCustomField = new nsComplexObject('BooleanCustomFieldRef');
$BooleanCustomField->setFields(array('internalId' => 'custbody_pricecustom', 'value' => False));
$StringCustomField = new nsComplexObject('StringCustomFieldRef');
$StringCustomField->setFields(array('internalId' => 'custbody_tofollow', 'value' => 'Test'));
$InvoiceFields = array(
'internalId' => $InvoiceId,
'customFieldList' => array($BooleanCustomField));
$InvoiceRecord -> setFields($InvoiceFields);
$updateResponse = $myNSclient->update($InvoiceRecord);
when I try to update a boolean (Checkbox) field, it always fail to change. But when I update other custom field i.e. String Field, it works perfectly.