Code to delete Dimension Values in Axapta Sales Order

Last post 07-06-2008 11:01 PM by Aaron Monteiro. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-01-2008 6:51 AM

    Code to delete Dimension Values in Axapta Sales Order

    In Sales Order; 

    This below code intilizes the default values in Sales Line From Header(Sales Table) when a new line added

    void  initValue()
    {;
    salesLine.initFromSalesTable(salesTable);
        super();
    }

     Is there a way write a code to Clear or Delete Values of Sales line Dimensions within this code or call a method simultaneously.

     Thank you in advance

     

    Best Regards,
    Aaron
  • 07-04-2008 2:10 AM In reply to

    Re: Code to delete Dimension Values in Axapta Sales Order

    Hi, Check out the method

    \Classes\SalesLineType\initFromSalesTable

    In case u dont want Dimensions to initialize from SalesTable, comment out

    salesLine.Dimension             = _salesTable.Dimension;

    in the above method. Hope it helps.

    Arijit Basu
    MVP - Microsoft Dynamics AX
    http://daxguy.blogspot.com
  • 07-05-2008 1:41 AM In reply to

    Re: Code to delete Dimension Values in Axapta Sales Order

    Hi, Thank you,

    I had checked it out!

    I am afraid if the same class is called out in any other methods this may casue some other serious problems!

    Is there any way to find out the dependant methods or functions on this class. I sure you know the whole architecture of this software. Please help!

    Thank you so much

    Aaron

    Best Regards,
    Aaron
  • 07-06-2008 6:03 PM In reply to

    Re: Code to delete Dimension Values in Axapta Sales Order

    well... if that is a concern to yo then you can try doing something like this:

    void  initValue()
    {

    dimension origDim;  // mohammed : NL : date : To store salesline Dims, before they are updated from the header

    ;

    origDim = salesLine.dimension; // MO : NL
    salesLine.initFromSalesTable(salesTable);

    salesline.dimension = origDim;  // mo: NL

        super();
    }

    hope that helps.

    let me know if you have any more questions.

    regards,

    Mohammed

    www.dynamic-ax.co.uk

    www.dynamic-ax.co.uk
  • 07-06-2008 8:36 PM In reply to

    Re: Code to delete Dimension Values in Axapta Sales Order

    Hi,

      U can update XRef and find out 'Used By' & ' Using' to check the dependencies. The SO is a place where orders are created from CRM, Projects and other areas so the entire hierarchy of SalesLineType_ uses this method. It would be nice if you could create a new method in salesLine and put it after salesLine.initFromSalesTable(salesTable);
    salesLine.voidDimensions(salesTable);

    Also remember to configure the Dimension Update Parameters in the AR Parameters form. Hope this helps.

    Arijit Basu
    MVP - Microsoft Dynamics AX
    http://daxguy.blogspot.com
  • 07-06-2008 11:01 PM In reply to

    Re: Code to delete Dimension Values in Axapta Sales Order

    Thank you so much

    This information is very useful!

    Rasheed has helped me with the code.

    Both of you are very helpful.

    1000 Thanks

     AARON

    Best Regards,
    Aaron
Page 1 of 1 (6 items)