Discussion:
Updating from Sales Order Header to Sales Lines
(too old to reply)
Adam
2007-06-04 19:58:00 UTC
Permalink
Hello,

I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.

Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.

Any suggestions would be greatly appreciated.

Thanks,
Adam
Player
2007-06-06 09:49:01 UTC
Permalink
Adam,

I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)

salesLine.<field> = salesTable.<field>

Kind regards,

Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
Adam
2007-06-08 14:13:01 UTC
Permalink
Hi Philippe,

Thanks for the suggestion. This works for initializing the values, but I
also want to copy the AX behavior that when I change the value at the order
header, the value flows down into the line items.
Post by Player
Adam,
I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)
salesLine.<field> = salesTable.<field>
Kind regards,
Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
unknown
2007-06-09 07:03:00 UTC
Permalink
Hey, Adam.

You have to add the new header fields to a fieldgroup HeaderToLineUpdate (I
can't remember the exact name, something like that).

This will prompt the user with the standard message about modifing the
fields (it works for a lot of others on the header).

Then, if it still doesn't work, you might have to modify the AxSalesLine
class a little bit, specifically look into the initFieldsFromHeader method
(the name is also written by memory, sorry)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Philippe,
Thanks for the suggestion. This works for initializing the values, but I
also want to copy the AX behavior that when I change the value at the order
header, the value flows down into the line items.
Post by Player
Adam,
I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)
salesLine.<field> = salesTable.<field>
Kind regards,
Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
Adam
2007-06-11 22:06:00 UTC
Permalink
Hi Vanya,

Thanks for the reply. I have also added the fields to the field group
(HeaderToLineUpdate). Then to make the fields display on the parameters form
(AR > Setup > Parameters > Updates Tab > Update order lines button), I added
my fields to the switch statement in the SalesTable2LineField class in the
LineUpdateDescription method. Now my fields display and I can select whether
I want to update the line items "never", "prompt", or "always". When I
select "prompt", the prompt shows properly, but the update does not occur.
Post by unknown
Hey, Adam.
You have to add the new header fields to a fieldgroup HeaderToLineUpdate (I
can't remember the exact name, something like that).
This will prompt the user with the standard message about modifing the
fields (it works for a lot of others on the header).
Then, if it still doesn't work, you might have to modify the AxSalesLine
class a little bit, specifically look into the initFieldsFromHeader method
(the name is also written by memory, sorry)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Philippe,
Thanks for the suggestion. This works for initializing the values, but I
also want to copy the AX behavior that when I change the value at the order
header, the value flows down into the line items.
Post by Player
Adam,
I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)
salesLine.<field> = salesTable.<field>
Kind regards,
Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
unknown
2007-06-12 05:56:00 UTC
Permalink
The fields are not updated, because you do not update them.

Insert a breakpoint in the AxSalesTable.setTableFields() method - it's easy
to see what is going on there. You just have to add your code there (make it
similar to what we already have there)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Vanya,
Thanks for the reply. I have also added the fields to the field group
(HeaderToLineUpdate). Then to make the fields display on the parameters form
(AR > Setup > Parameters > Updates Tab > Update order lines button), I added
my fields to the switch statement in the SalesTable2LineField class in the
LineUpdateDescription method. Now my fields display and I can select whether
I want to update the line items "never", "prompt", or "always". When I
select "prompt", the prompt shows properly, but the update does not occur.
Post by unknown
Hey, Adam.
You have to add the new header fields to a fieldgroup HeaderToLineUpdate (I
can't remember the exact name, something like that).
This will prompt the user with the standard message about modifing the
fields (it works for a lot of others on the header).
Then, if it still doesn't work, you might have to modify the AxSalesLine
class a little bit, specifically look into the initFieldsFromHeader method
(the name is also written by memory, sorry)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Philippe,
Thanks for the suggestion. This works for initializing the values, but I
also want to copy the AX behavior that when I change the value at the order
header, the value flows down into the line items.
Post by Player
Adam,
I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)
salesLine.<field> = salesTable.<field>
Kind regards,
Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
Adam
2007-06-12 14:31:00 UTC
Permalink
Hi Vanya,

Thanks again, I'll give it a look!
Post by unknown
The fields are not updated, because you do not update them.
Insert a breakpoint in the AxSalesTable.setTableFields() method - it's easy
to see what is going on there. You just have to add your code there (make it
similar to what we already have there)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Vanya,
Thanks for the reply. I have also added the fields to the field group
(HeaderToLineUpdate). Then to make the fields display on the parameters form
(AR > Setup > Parameters > Updates Tab > Update order lines button), I added
my fields to the switch statement in the SalesTable2LineField class in the
LineUpdateDescription method. Now my fields display and I can select whether
I want to update the line items "never", "prompt", or "always". When I
select "prompt", the prompt shows properly, but the update does not occur.
Post by unknown
Hey, Adam.
You have to add the new header fields to a fieldgroup HeaderToLineUpdate (I
can't remember the exact name, something like that).
This will prompt the user with the standard message about modifing the
fields (it works for a lot of others on the header).
Then, if it still doesn't work, you might have to modify the AxSalesLine
class a little bit, specifically look into the initFieldsFromHeader method
(the name is also written by memory, sorry)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Philippe,
Thanks for the suggestion. This works for initializing the values, but I
also want to copy the AX behavior that when I change the value at the order
header, the value flows down into the line items.
Post by Player
Adam,
I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)
salesLine.<field> = salesTable.<field>
Kind regards,
Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
Adam
2007-06-12 15:00:01 UTC
Permalink
Thanks, it works! In case others ever want to do the same thing, here's what
I did...

Add the fields to both SalesTable and SalesLine tables.

Create a field group on each table and drag the fields into the field groups.

Drag the fields into the "HeaderToLinesUpdate field group on the SalesTable.

Add code to the switch statement in the SalesTable2LineField class in the
LineUpdateDescription method.

Add a set method for each field to the AxSalesLine class
Add a parm method for each field to the AxSalesLine class
Add a parm method for each field to the AxSalesTable class

Add code to the setTableFields method of the AxSalesLineClass to call the
set method for each field.


It's working perfectly now. Thanks again Vanya!
Adam
Post by unknown
The fields are not updated, because you do not update them.
Insert a breakpoint in the AxSalesTable.setTableFields() method - it's easy
to see what is going on there. You just have to add your code there (make it
similar to what we already have there)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Vanya,
Thanks for the reply. I have also added the fields to the field group
(HeaderToLineUpdate). Then to make the fields display on the parameters form
(AR > Setup > Parameters > Updates Tab > Update order lines button), I added
my fields to the switch statement in the SalesTable2LineField class in the
LineUpdateDescription method. Now my fields display and I can select whether
I want to update the line items "never", "prompt", or "always". When I
select "prompt", the prompt shows properly, but the update does not occur.
Post by unknown
Hey, Adam.
You have to add the new header fields to a fieldgroup HeaderToLineUpdate (I
can't remember the exact name, something like that).
This will prompt the user with the standard message about modifing the
fields (it works for a lot of others on the header).
Then, if it still doesn't work, you might have to modify the AxSalesLine
class a little bit, specifically look into the initFieldsFromHeader method
(the name is also written by memory, sorry)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Philippe,
Thanks for the suggestion. This works for initializing the values, but I
also want to copy the AX behavior that when I change the value at the order
header, the value flows down into the line items.
Post by Player
Adam,
I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)
salesLine.<field> = salesTable.<field>
Kind regards,
Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
Shahzad Butt
2007-11-07 17:07:01 UTC
Permalink
Adam, can you please give me your code for SET method in AXsalesLine class.
my requirement is slightlydifferent. i have a new field added to salesLine
and i want to pass the data in that field when Intercompany update takes
place. at the moment its only getting the standard fields and new field is
blank in other company wehreas modified in the original company

thanks,
shahzad
Post by Adam
Thanks, it works! In case others ever want to do the same thing, here's what
I did...
Add the fields to both SalesTable and SalesLine tables.
Create a field group on each table and drag the fields into the field groups.
Drag the fields into the "HeaderToLinesUpdate field group on the SalesTable.
Add code to the switch statement in the SalesTable2LineField class in the
LineUpdateDescription method.
Add a set method for each field to the AxSalesLine class
Add a parm method for each field to the AxSalesLine class
Add a parm method for each field to the AxSalesTable class
Add code to the setTableFields method of the AxSalesLineClass to call the
set method for each field.
It's working perfectly now. Thanks again Vanya!
Adam
Post by unknown
The fields are not updated, because you do not update them.
Insert a breakpoint in the AxSalesTable.setTableFields() method - it's easy
to see what is going on there. You just have to add your code there (make it
similar to what we already have there)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Vanya,
Thanks for the reply. I have also added the fields to the field group
(HeaderToLineUpdate). Then to make the fields display on the parameters form
(AR > Setup > Parameters > Updates Tab > Update order lines button), I added
my fields to the switch statement in the SalesTable2LineField class in the
LineUpdateDescription method. Now my fields display and I can select whether
I want to update the line items "never", "prompt", or "always". When I
select "prompt", the prompt shows properly, but the update does not occur.
Post by unknown
Hey, Adam.
You have to add the new header fields to a fieldgroup HeaderToLineUpdate (I
can't remember the exact name, something like that).
This will prompt the user with the standard message about modifing the
fields (it works for a lot of others on the header).
Then, if it still doesn't work, you might have to modify the AxSalesLine
class a little bit, specifically look into the initFieldsFromHeader method
(the name is also written by memory, sorry)
--
Kashperuk Ivan (Vanya),
Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Adam
Hi Philippe,
Thanks for the suggestion. This works for initializing the values, but I
also want to copy the AX behavior that when I change the value at the order
header, the value flows down into the line items.
Post by Player
Adam,
I think you just need to add your fields to the method
Classes\SalesLineType\initFromSalesTable(...)
salesLine.<field> = salesTable.<field>
Kind regards,
Philippe
Post by Adam
Hello,
I have added a few fields to the sales table and sales line tables and the
Sales Table form. I would like these fields to follow the standard AX
behavior (i.e. change the value at the header and update the line items). I
added the fields to the HeaderToLineUpdate field group and added code to
SalesTable2LineField class in the LineUpdateDescription method so my fields
would be shown on the AR parameters (Update Order Lines) form.
Everything is working well, I see my fields on the sales table, sales line,
and the parameters form. The problem is nothing is updating from the header
to the lines. It prompts when I have the parameter set to prompt but the
field does not update down to the line.
Any suggestions would be greatly appreciated.
Thanks,
Adam
Loading...