Question

How to set department in employee on netsuite with mule ESB?

Was it helpful?

Solution

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>

OTHER TIPS

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]" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top