Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet


Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Saturday, December 31, 2005

Preform a PackingSlip Update through code

To continue on with post like the previous, below is code that will take a given salesid an perform a packslip update on it.

public packSlipUpSO(SalesId _salesid)
{
SalesFormLetter SalesFormLetter = SalesFormLetter::construct(DocumentStatus::PackingSlip,true);
SalesTable SalesTable = SalesTable::Find(_salesId);
;

SalesFormLetter.update(SalesTable,systemDateGet(), SalesUpdate::ALL, AccountOrder::None, false, false);

}

This is in short form, because that is what someone left comments about on the last post, so I thought I would put this in short form just for them! Anyway, if you notice the 'SalesUpdate::ALL'. This enum tells the update posting that take the entire sales order and mark it has being packing slip updated. If you only wanted what was set as delivered now from within the sales line, then you could change this to the value: SalesUpdate::DeliverNow.

Also if you would like to see the longer version of this code please request it. I would also like to take the time and ask that anyone leave comments on any request or problem you might be having and I will be glad to help you solve it.

Find a job at: www.DynamicsAXJobs.com

2 Comments:

Blogger RogerB said...

Hi Brandon,

I am using similar code for purchase orders but using the longer version as I need to update the line quantities using code and am having trouble. When it enters purchFormLetter.run() it never enters the while(query.next)) loop. Do you maybe have a solution to help me? Thanks.

Roger

9:06 AM  
Anonymous Anonymous said...

Have a look at the axaptapedia salesformletter post

11:56 AM  

Post a Comment

<< Home


Copyright 2005-2011, J. Brandon George - All rights Reserved