Question

I am very new to Mule NetSuite Connector. I am trying to update NetSuite Sales Order status using NetSuite Connector.

I have written configuration xml like below to update the sales order.

<flow name="netsuite-create-sales-orderFlow2" doc:name="netsuite-create-sales-orderFlow2">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8084" path="UpdateSalesOrder" doc:name="HTTP"/>
    <netsuite:update-record config-ref="Netsuite" recordType="SALES_ORDER" doc:name="Netsuite">
        <netsuite:attributes>
            <tranId>299</tranId>
            <orderStatus>_pendingFulfillment</orderStatus>
        </netsuite:attributes>
    </netsuite:update-record>
</flow>

In the above code '299' is my sales order number and I am trying update that sales order status from "_pendingApproval" to "_pendingFulfillment". But I am getting 'IllegalArgumentException".

java.lang.IllegalArgumentException: No enum const class com.netsuite.webservices.transactions.sales_2013_2.types.SalesOrderOrderStatus._pendingFulfillment

Can some one please correct me Where I am doing wrong.

Was it helpful?

Solution

Change your code with

 <netsuite:attribute key="orderStatus" value="PENDING_FULFILLMENT"/>

OTHER TIPS

Use : PENDING_FULFILLMENT Or #[com.netsuite.webservices.transactions.sales_2013_2.types.SalesOrderOrderStatus.SalesOrderOrderStatus.PENDING_FULFILLMENT] (You can use global imports to hide that verbose pacakge - http://www.mulesoft.org/documentation/display/current/Mule+Expression+Language+Tips)

You can refer to the possible enum values here (Under "Summary"):http://mulesoft.github.io/netsuite-connector/java/com/netsuite/webservices/transactions/sales_2013_2/types/SalesOrderOrderStatus.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top