I have created a date field (Planned date) on Sales order line . When a item is added to line, auto-populate the Planned date field such that the Production time should be added into it with sys date as
Planned date = sys date + Item coverage Production time.
How to achieve this as both are different forms ? ( i added the code in modified field of sales order line ) but it was not functional at all.
Ok, that is from ReqItemTable. You need to find that with the help of Item Id and covInventDimId (InventDImid built with coverage dimensions). Look at the find method in ReqItemTable and its cross references to know how to built the covInventDimId.
ok i am too much confused i have tried code in both and also put debugger but it is not even debugging it , guide me how can i display current date in my customized field(planned date).
If i am able to insert system date into it i will manage to add production days in it as well
That should be working, unless the sales line is created from the another source or you are not manually modifying the item id on sales Lines. Will you be able to show/tell us what logic and where you have written?
You want the plan date to be populated when the item id is updated, so the code should be triggered when the item id is modified but not on its own modified event
Remember that the reqItemTable find needs a covInventDimId, it only works as long as the sales inventDimId and covInventDimId are same. If your sales line have dimension more or less than the coverage dimensions, then it may not work.
You can use, \Data Dictionary\Tables\InventDim\Methods\reqCovDimId for getting covInventDimId for an inventDimId (the method is from AX 2012, i am not sure if it exists in AX 2009)