Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
PHPToolkit and CustomRecordRef
I was unable to perform a 'get()' operation for custom records but hacked my way around it.
Fetching custom records requires the CustomRecordRef type rather than the RecordRef as with all other 'get()' requests. But the PHPToolkit 2009.1 r1 beta requires a RecordRef to be passed for the 'get()' method and the nsCustomRecordRef class was completely missing.
I added:
[CODE]class nsCustomRecordRef extends nsComplexObject
{
function __construct (array $fields = null)
{
parent::__construct('CustomRecordRef');
parent::setFields($fields);
}
}[/CODE]
to the PHPtoolkit.php file and modified the 'get()' method to not require the nsRecordRef object.
[CODE]function get($recordRef) {[/CODE]
Fetching custom records requires the CustomRecordRef type rather than the RecordRef as with all other 'get()' requests. But the PHPToolkit 2009.1 r1 beta requires a RecordRef to be passed for the 'get()' method and the nsCustomRecordRef class was completely missing.
I added:
[CODE]class nsCustomRecordRef extends nsComplexObject
{
function __construct (array $fields = null)
{
parent::__construct('CustomRecordRef');
parent::setFields($fields);
}
}[/CODE]
to the PHPtoolkit.php file and modified the 'get()' method to not require the nsRecordRef object.
[CODE]function get($recordRef) {[/CODE]
0