NAVcommerce is capable of processing additional order attributes. There are a couple of popular extensions that can be used for this. The most popular one among our customers is the Amasty Order Attributes extension.
But you can also accomplish this by doing so custom programming. As long as the end result is an additional array of values, named custom_attributes or amasty_order_attributes, on the order object you should be good. Up next the only thing to do is to write a custom order processing code unit which takes care of handling these custom fields and values.
Probably the best way to do is, is to take a copy of the standard code unit 11260665 (NC Sales Order Mgt.), and add your code after the point where the Sales Header has been created. (Around line 125).

There you can safely process the so called Extension Data.
Below is an example of how to do this. In this case we are looking for 3 values; your_reference, preferred_delivery_date and comments and we’re storing them in the same sales header.
In order to make this work we created 5 variables:

Name Date Type
NCSDKExtensionData Record NC SDK Extension Data
AttributeKey Text
AttributeValue Text
AttributeDataType Text
DeliveryDate Date
//<-- Amasty order attributes
NCSDKExtensionData.SETRANGE("Record ID",NCSalesHeader.RECORDID);
    IF AttributeValue <> '' THEN BEGIN
      CASE AttributeKey OF
          SalesHeader."Ext Doc No" := COPYSTR(AttributeValue,1,MAXSTRLEN(SalesHeader."Ext Doc No"));
            SalesHeader."Requested Delivery Date" := DeliveryDate;
          SalesHeader."Comment" := COPYSTR(AttributeValue,1,MAXSTRLEN(SalesHeader."Comment" ));
  UNTIL NCSDKExtensionData.NEXT = 0;
//Amasty order attributes -->

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.