Reputation: 71
How to set department in employee on netsuite with mule ESB?
Upvotes: 3
Views: 1066
Reputation: 71
Add Department to emplloyee looks like this
<netsuite: update-record recordType="EMPLOYEE" id="#internalId">
<netsuite:attributes>
<netsuite:attribute key="department" value="#[groovy: new com.netsuite.webservices.platform.core_2010_2.RecordRef( com.netsuite.webservices.platform.core_2010_2.types.RecordType.DEPARTMENT,'InternaldepartmentID','ExternalDepartmentID' );]"/>
</netsuite:attributes>
</netsuite:update-record>
Upvotes: 2
Reputation: 1
You can definitely use NetSuite Cloud Connector to create an EMPLOYEE. The snippet for mule-config.xml would look something along the lines of this:
<netsuite:add-record recordType="EMPLOYEE">
<netsuite:attributes>
<netsuite:attribute key="firstName" value="#[variable:firstName]" />
<netsuite:attribute key="lastName" value="#[variable:lastName]" />
<netsuite:attribute key="email" value="#[variable:email]" />
</netsuite:attributes>
</netsuite:add-record>
You can find more information about our connector here.
A department can be set using a regular attribute:
<netsuite:attribute key="deparment" value="#[variable:departmentId]" />
Upvotes: -1