AX 2012 AIF - Passing custom unbound parameters to a document service

Hi All,

Is there a way to pass custom parameters to a standard document service? More specifically, I would like to modify the Sales Order service to accept a string value that I can then access from the Axd class, without actually having to create a field on the underlying tables.

An example of this would be the DocPurpose on the SalesSalesOrder data object. I tried creating a similar parameter in that class but this is not visible in the data policies. I also don’t understand how I can then access this parameter from the AxdSalesOrder class.

Any suggestions would be greatly appreciated.

Thank you,

Peter

You can easily add a new parm method to an Ax class - see an example in AIF: How to add extra non database field into XSD.

You would save the value to a variable and then use it in prepareForSave(), for instance.

Thanks a lot Martin, that worked perfectly. I was focusing on the wrong class (SalesSalesOrder) rather than the AxSalesTable one.