mutilple record in form grid problem

dear guys ,

In Ax 2012 , i have a master form where i can select multiple record in runtime .

i have a button which open a drop dialog form for updating one field in master form ,

now my problem is how to select multiple record for update during runtime . can i take that in a while select loop

so that i can write an update the selected record.

Hi Himanshu,

With button its not possible to connect dynamic relation so better in place of button take menu item button.

and yes you are write using while loop to update select multiple records . if you need more help send exact task , i will send xpo file to your mail id.

Thanks

Ravindar

If I got your question right - you want to update several marked records at the time, right? If so, does this blog article help you in any way (?):

http://axwonders.blogspot.ch/2011/10/loop-through-selected-records-on-ax.html

…because it sound as if you are trying to do exactly this.

P.S. Ravindar*, sorry if I might offend you a bit by saying this, but it feels that you don’t have that much experience in AX development yet, BUT you constantly write some misleading statements here and there… if I am not sure about something, I don’t begin my sentence with “it’s not possible” or something like that. Please, don’t state unverified statements and don’t mislead people in what AX actually can do or can’t do. I would say that if it would have been just this time, but I have noticed already at least 3 episodes where you stated something which is not certainly a truth.*

hi guys ,

thanks for the reply .but i have already try this . may be we can retrive from tempory table .

as i have to pass that selected record in different form ( means to the drop dialog form attached to button ) so it is getting tougher .

himanshu kotnala

If you use a proper menu item, you can pass some args along with it. One of the args might be a caller object, in this case it would be the parent from in which you do those record selections.

If for you use a button in parent form to open the child form, you can pass the values to the child form by passing parameters to args. Just like here:

http://dynamicsuser.net/forums/p/44827/226838.aspx

or here:

http://www.axaptapedia.com/Passing_values_between_forms

if you set up a parm reference method (let’s say called parmMainDS(), which basically returns the datasource object InventTable_DS, for example) in your parent class to the datasource object, you can then later on refer to this parent datasource (caller.parmMainDS()) in a child form and in this way also retrieve the parent form’s marked records with a little help of this code:

http://axwonders.blogspot.ch/2011/10/loop-through-selected-records-on-ax.html

Hi Janis Cehovs,

Thanks for your suggestion, i am junior in Ax, I did some tasks in form level by using button to update table, its not but same thing developing the class using menu item button , Updated in table with selecting multiple of records based on that experiences suggest him even at the end of Message always i asks to post exact task, to reply xpo file… Once again thanks for your suggestion…

Thanks

Ravindar

Ravindar, yes, I know, it does happen that guys don’t describe their exact problem or they write it so complex and unclear that you have to struggle to understand it and of course it may not be that simple to give a good advice for a problem that is unclear.

My idea about Himanshu’s issue is:

If you use a proper menu item to open the dialog (or a special code), then you can pass some args along with it. One of the args might be a caller object (the object that calls the menu item), in this case it could be the parent form in which user does record selections.
If you use a button in parent form to open the child form, you can pass the values to the child form by passing different parameters with args. Just like here:

http://dynamicsuser.net/forums/p/44827/226838.aspx

or here:

http://www.axaptapedia.com/Passing_values_between_forms

if you set up a parm reference method, let’s say a method called parmMainDS(), which basically returns for example a datasource object InventTable_DS, in your parent form, then you can later on refer to this parent datasource (caller.parmMainDS()) in a child form (or class) and in this way you can also retrieve parent form’s marked records with a little help of this code:

http://axwonders.blogspot.ch/2011/10/loop-through-selected-records-on-ax.html

So in this particular code you could refer to caller.parmMainDS() instead of CustInvoiceJour_ds which is mentioned in the example and you could retrieve the records marked in caller form.

Ok, I just tried to post a more detailed description about how you could solve this issue with passing parameters, but all I get is a message:

Post Pending ModerationYou have posted to a forum that requires a moderator to approve posts before they are publicly available.

The following message is on behalf of Janis with a very big thank you to Janis [:D]


If you use a proper menu item (or use a special code) to call the child form or class, then you can pass some args along with it. One of the args might be a caller object, in this case it would be the parent form (in which user can do record selection).

If for you use a button in parent form to open the child form, you can pass the values to the child form by passing parameters to args in code. Just like here:
http://dynamicsuser.net/forums/p/44827/226838.aspx

or here:

http://www.axaptapedia.com/Passing_values_between_forms

if you set up a parm reference method (let’s say called parmMainDS(), which basically returns the datasource object InventTable_DS, for example) in your parent class to the datasource object, you can then later on refer to this parent datasource (caller.parmMainDS()) in a child form and in this way also retrieve the parent form’s marked records with a little help of this code:

http://axwonders.blogspot.ch/2011/10/loop-through-selected-records-on-ax.html

…so, from the example in the link above, you woud have to replace form_ds = CustInvoiceJour_ds TO form_ds = caller.parmMainDS().