I have create fild Vehicle Number in SalesParamTable and same field I have created in CustPackingslipJour, Now I want when I post Packing Slip Vehicle Number field also updated in CustpackingSlipJour.
Which class or method updates it in AX 2009
Thanks in advance.
You need to write the code in Tables → CustPackingslipJour → Methods → initFromSalesTable
this.(your field name) = _salesTable.(your field name);
I hope this will be useful for you
initFromSalestable - will help you to initialize the fields from salesTable and not salesParmTable.
Try to place this in, \Classes\SalesFormLetter_PackingSlip\writeJournal
Thanks for correcting me… Actually i read that as Salestable instead of salesparmtable…
and this solution for AX 2012 is not the same, isn’t it?
I have issues to pass some values from salesParmTable and SalesParmUpdate to custPackingSlipJour.
Could you help me with AX 2012?
Thank you very much for your time!
Welcome to DUG [:)]
Have you had a look at ‘SalesPackingSlipJournalCreate’ class. In particular ‘initHeader()’ and other methods such as ‘initTotals()’.
I’m trying to correct the customization developed by Josep.
I don’t know If this customization worked well in the past but now I must to pass absolutly some fields from SalesParmUpdate to packingSlipJour (NOW I’m the only one developer in my company and I have to develop in Navision from 3.7 to 20009 ,ad Axapta 2009 and 2012)
My ex-colleague had added this fields into SalesParmUpdate table and CustPackingSlipJour:
When the SaleEditLines dialog is closed this fields have the correct value(that user had setted)
Josep modified the initHeader() method in class SalesPackingSlipJournalCreate.
custPackingSlipJour.WMSPackageAppearance = salesParmUpdate.WMSPackageAppearance;
custPackingSlipJour.WMSCarrierName = salesParmUpdate.WMSCarrierName;
custPackingSlipJour.CartonsQty = salesParmUpdate.CartonsQty;
custPackingSlipJour.NetWeight = salesParmUpdate.NetWeight;
custPackingSlipJour.GrossWeight = salesParmUpdate.GrossWeight;
CustPackingSlipJour.EST_ShipDate = salesParmUpdate.EST_ShipDate;
CustPackingSlipJour.EST_ShipTime = salesParmUpdate.EST_ShipTime;
I debug the process by Visual Studio linked to Ax Server Process. And I check that in this method the salesParmUpdate didn’t have the value for this fields.
It’s strange because in table we have the correct value, and Parmid of salesParmUpdate local variable is correct.
I read the documentation http://technet.microsoft.com/en-us/library/hh272871.aspx. But i didn’t understand the correct position to had some code to solve the problem.
PS. I try to modify Josep’s code but visual studio doesn’t show the change. I tried to compile and generate CIL…but nothing changed.
PPS. Sorry for my bad English
I solve the problem of passing of values from parmupdate to packingslipjour. I had to regenerate the CIL. Sorry form my stupid Question.
Ax 2012 environment is more complex than Ax2009 and I’m in difficult to understand the correct way to make the changes.