Friday, March 15, 2019

PHP Toolkit 2012.2 > Perform a DELETE operation on a Custom Record

Note: The information contained in this article may or may not lead to the alteration of data in your production account, thus NetSuite holds no liability whether you choose to follow the instructions. In the event that data is deleted, altered or removed and requires restoration there will be applicable fees. Please proceed with caution.


//Note: Using PHPToolkit v2012.2

 $basicCustomRecord = new CustomRecordRef();
 $basicCustomRecord->internalId = "1"; // internal id of the custom record you want to delete
 $basicCustomRecord->typeId = "123"; // Record Type's internal ID (Setup > Customization > Record Types > (internal id)
 $basicCustomRecord->type = 'customRecord';
 
 $request = new DeleteRequest();
 $request->baseRef = $basicCustomRecord;
 
 $delResponse = $service->delete($request);

No comments:

Post a Comment