Hey,

The Misc Charges table (markupTrans) is linked by TableID (markupTrans.TransTableID) and recID (markUpTrans.TransRecID), so the charges associated with a particular salesOrder will have most likely show a transTableID of 366 and the transRecID will be the recID of the salesTable record for that order. When you call the markupTrans form from the pickingList registration form the salesTable recid and tableID aren’t available for it to make the appropriate relationship. If the markup line is already in place and you just want to update the value I’d suggest adding a field to the SalesPickingListRegistrate form and perform the update your self from there, you could actually attach the code to the update button before the call to super. I’ve adjusted some code I use to update MarkupTrans records below hope you can build with it…

g’luck –Preston

This assumes a new field named freightAmount has been added to the form…..


MarkupTrans markupTrans; salesTable lclSalesTable; real _amount; tableID _TableID; recID _TransRecID; markupCode _MarkupCode

   _amount     = freightAmount.Value();
   if(_amount){
       _TableID    = tableName2ID('salesTable');
       _TransRecID = salesTable::find(SalesPickingListJournalTable.salesTable);
       _MarkupCode = 'yourFreightCode';//-------------------------this has to be the 
code you use for the freight mark up

       ttsBegin;
       select forupdate markupTrans
           where   markupTrans.TransRecID      == _TransRecID &&
                   markupTrans.TransTableId    == _TableID  &&
                   markUptrans.MarkupCode      == _MarkupCode;

       markUpTrans.Value = _Amount;
       markUpTrans.update();
       ttsCommit;
   }
   return;


.


-----Original Message-----
From: Hemant Kumthekar [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 5:30 PM
To: Axapta
Subject: [development-axapta] Misc Charges for Sales Order


Hi,

I have setup Auto Misc charges (FREIGHT) for Sales Order. So when sales order is created the Misc Charge record gets automatically added. I have a requirement where by the shipping clerk updates the Freight Charges. So during Packing List update I created a menu button on the form and called the same MeuItem as what is being called in Sales order entry. But when I click that Menu button the form which is displayed is for entry of Misc Charges but it is actually taking the charges setup in Inventory and not the Sales Order. I am attaching the screen shot, can somebody guide me how I should get the same form as displayed during the Sales Order >> Setup >> Misc Charges.

Thank you in advance.
_____


Do you Yahoo!?
Free Pop-Up Blocker - Get it now



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


Yahoo! Groups Sponsor

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

Reply via email to