Attach and Detach records
About Attach and Detach Record
The Attach Record feature uses a RESTful HTTP call to attach or detach one NetSuite record with another record. Advanced Inventory provides a mobile app solution to facilitate the Attach Record process through a hand held mobile device. The Advanced Inventory app is integrated to work with NetSuite functionality.
Attach and Detach Record relationships
The table below shows the relationships for attach and detach functionality.
Attach Relationships | Detach Relationships |
---|---|
A Support Case to an Issue |
Issue detached from Support Case |
A Contact to any Customer, Partner, Vendor, Lead, Prospect, or Project |
Contact detached from Customer, Partner, Vendor, Lead, Prospect, or Project |
A File to any transaction, item, activity, custom, or entity record |
File detached from any transaction, item, activity, custom, or entity record |
A custom child record to a supported parent record |
Custom child record detached from supported parent record |
An entity to a static entity group |
Entity detached from a static entity group* |
Note:* If detaching an entity from a static entity group, you must specify entitygroup as the internal ID for the type2 argument.
Call the base URL
To call the Attach Record feature, use the URL listed below.
https://rest.na1.netsuite.com/app/site/hosting/restlet.nl?script=customscript_dsi_attachrecord&deploy=customdeploy_dsi_attachrecord
HTTP headers
The authorization header is only needed if Token Based Authentication is not being used.
Authorization
NLAuth nlauth_account=*******, nlauth_email=******, nlauth_signature=******, nlauth_role=****
Content-Type
application/json
Supported HTTP methods
The Attach Record feature supports the following methods.
-
GET
-
POST
-
PUT
Define required and optional input fields
The table below describes the required and optional input fields for the Attach Record feature.
Field | Req | Description |
---|---|---|
childtype | Yes | Record Type of the child record to be attached to the parent |
childid | Yes | Internal Id of the child record to be attached |
parenttype | Yes | Record Type of the parent record for the attached child record |
parentid | Yes | Internal Id of the parent record |
mc_user | No | User name to be recorded in Last Advanced Inventory User on the both records |
role | No | User role field, used only in attaching entity records |
field | No | The field on the child that links to a Custom Record |
detach | No | T if detaching, F by default |
Input JSON template
If the POST or PUT methods are used, the body of the request will be JSON .
Input JSON template
{ "childtype": "", "childid": "", "parenttype": "", "parentid": "", "mc_user": "", "role": "", "field": "", "detach": "" }
Output JSON template
The feature returns either a NetSuite error object or the internal id of the target record to indicate success.
Output JSON template
SUCCESS: { "success": "" } ERROR: { "error": { "code": "", "message": "" } }
Loading...
There was a problem loading this topic