How to set department in employee on netsuite with mule ESB?
Asked
Active
Viewed 1,044 times
3
-
Unless you provide a link to the Netsuite API you intend to use, it will be hard for Mule users to help you. – David Dossot Sep 16 '11 at 21:29
-
I use this connector to NetSuite http://www.mulesoft.org/muleforge/netsuite-cloud-connector – Hellish Shoman Sep 19 '11 at 07:54
-
Oh, OK. I've pinged 3miliano so he could look at this question and answer you. – David Dossot Sep 19 '11 at 08:58
2 Answers
2
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>

Hellish Shoman
- 71
- 6
-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]" />
-
I had to add a department employee. I already know I know how to add a department employee. Now there was a problem removing the department from the employee. – Hellish Shoman Sep 19 '11 at 14:47
-
this not work, argument type mismatch - had objects of type "java.lang.String" but expected signature "com.netsuite.webservices.platform.core_2010_2.RecordRef" – Hellish Shoman Sep 19 '11 at 14:51
-
-
-
Can you file an issue in github.com/mulesoft/netsuite-connector? This is clearly not the way we intend this connector to work. – Emiliano Lesende Sep 20 '11 at 12:04