I’ve used this code in 2.5 to packslip a salesOrder, think it will work in 3.0, but haven’t tested.


void packSlipOrder(salesID currSalesID) { SalesFormLetter_PackingSlip SFLPS; salesTable _salesTable;

_salesTable.data(salesTable::find(currSalesID));

   if(!_salesTable){
       strMsg = strFmt('Unable to find Sales Order %1\n', currSalesID);
       warning(strMsg);
       return;
   }

   SFLPS = New salesFormLetter_PackingSlip();
   SFLPS.transDate(systemDateGet());

SFLPS.update(_salesTable, salesUpdate::DeliverNow);


}


-----Original Message-----
From: pchalem1 [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 12:42 PM
To: [EMAIL PROTECTED]
Subject: [development-axapta] Problem in doing packing slip by code...


Hi Everyone...

I'm having problem with a code (part of the code is at the end of the email) that creates a packing slip from some code (and NOT from the SalesTable form) ... we had this running in version 2.5 without a problem, but on this version we're getting errors .... the problems comes down to the following...

The code instruction getLast() changes the SalesParmUpdate record related to the packing slip I need to create, so the system tries to generate a packing slip for something that has already been created... does anyone has a clue of what I'm missing in the code or how to avoid the getLast() method to change that record ???

I appreciate any help I can get.. best regards

Peter

**********************Code from the class******************
   salesFormLetterPack = new SalesFormLetter_PackingSlip(true);
   parmId = salesformLetterPack.parmId();
   flush salestable;
   salesTable = salesTable::find(_salesId);
   salesformletterPack.initparmsalestable(salestable);
   salesformletterPack.AlwaysPrintFormletter(true);
   salesformletterPack.allowEmptyTable
(salesformletterPack.initAllowEmptyTable(true));
   salesFormletterPack.multiForm(false);
   salesformLetterPack.getLast();
   salesformletterPack.transDate(systemdateget());
   salesformletterPack.parmId(parmId);
   salesformletterPack.specQty(salesUpdate::DeliverNow);
   salesFormLetterPack.sumBy(AccountOrder::Account);
   salesFormLetterPack.updateSumSalesId();





Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Yahoo! Groups Sponsor ADVERTISEMENT
click here


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to