http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?dg=microsoft.public.axapta&mid=ccbbcb93-44b9-48bd-a13f-724f056382f7
In your context the method is called to zero out the price fields,
before they are recalculated
Snippet from SalesLineType.initFromInventTable:
salesLine.lineAmountModified();
....
salesLine.setPriceDisc(inventDim);
There is another place, where the method is used:
The user can directly modifiy the LineAmount in the SalesTable form.
In that case it may not
correspond to the calculated value from quantity, price, discounts...
That's why those values are
zeroed then. And that's where the method got its name from I suppose.
It was probably just abused
for the other thing.
Mike
--- In [email protected], "Cyrus Bharda"
<[EMAIL PROTECTED]> wrote:
>
> Hello Everyone,
>
> While looking into a Sales Line issue I found that in the modified
method
> for the ItemId, there is a call to the following method:
>
> Data Dictionary\Maps\PriceDiscLine\Methods\lineAmountModified
>
> Stack Trace:
> \Data Dictionary\Maps\PriceDiscLine\Methods\lineAmountModified - line 3
> \Data Dictionary\Tables\SalesLine\Methods\lineAmountModified - line 3
> \Classes\SalesLineType\initFromInventTable - line 43
> \Data Dictionary\Tables\SalesLine\Methods\initFromInventTable - line 7
> \Data Dictionary\Tables\SalesLine\Methods\itemIdChanged - line 19
> \Forms\SalesTable\Data
Sources\SalesLine\Fields\ItemId\Methods\modified -
> line 45
> \Classes\FormStringControl\modified
> \Classes\FormStringControl\Leave
> \Classes\FormRun\task
> \Classes\SysSetupFormRun\task - line 20
>
> It is a fairly simple method that sets a whole bunch of values to 0
as seen
> below:
>
> void lineAmountModified()
> {
> this.price = 0;
> this.lineDisc = 0;
> this.linePercent = 0;
> this.multiLnDisc = 0;
> this.multiLnPercent = 0;
> this.markup = 0;
> }
>
> Can anyone tell me why this happens? I am confused as why you would
want to
> set these to zero, mainly because I cant see any code after that
fact that
> repopulates those fields before inserting them onto the sales line?
>
> Thanks for your help.
>
> Cy
>
>
> [Non-text portions of this message have been removed]
>
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

