Hello friends,
I m turning to find how to fix an issue.
When i use Multiselectionhelper its return only 1 record.
Do you know what could be the cause ?
When i put an info in the while loop, i'm getting displayed the good values selected.
Thanksfully.
PS : Here is a screenshot of my debug, it's written on my querybuilddatasource query : Select firstfast forupdate .... is it my issue ?
I hope you are calling method getnext() from MultiSelectHelper class
Before the end of while loop mention of selectionhelper.getnext(); so that helper class will go to the next selected records
example:
while(tablebuffer)
{
//...//
//...//
selectionHelper.getnext();
}
You re right again, my problem come from my query. I found the issue but still didnt get the way to resolve it. Thank you again.
I'm sorry but I don't understand this explanation.
Also if you can't follow the instructions that we gave earlier, you should ask for more help (in those discussions) instead of constantly trying completely new approaches.
What we have explained before is the "best practice". And what you're trying to do now doesn't seem like that (but since I don't understand it, I might be wrong).
I hope you find a solution to your business problem, but I don't have any new inputs at this point.
I am on a new form and first i used the way you and Martin teached me before.
It worked for my first task but here i'm not getting the same.
Here i changed the way i m making it to reach best practice way.
so first I get the caller datasource from my Display menu item button by changing datasource property on this button.
Then i override the init method of the opening form to be filtered.
But here the difference is that i wanna get the same values from the rows i selected in form A Grid and getting it on Form B.
I tried what i learned before and other ways even with select statement but didnt get it
Ok, so this seems to be yet another question about the same topic that we already discussed several times (filter a form based on many selected records in the caller form).
You can't do such filtering without the query based approach that we already provided to you. Were you not able to solve your business requirement with the help that we already provided?
community.dynamics.com/.../how-to-deal-with-multiselecthelper-on-clicked-event
community.dynamics.com/.../how-to-convert-from-set-type-to-int
community.dynamics.com/.../how-to-deal-with-element-args-parmobject-and-process-query-on-it
If you want to select by one selected record in the caller form, table relations handle it for you.
If you want to filter by multiple selected records in the caller form, you need to add multiple ranges to the query of the form that is opened.
Your issue has nothing to do with "MultiSelectionHelper returning only one record". I'm sure that your MultiSelectionHelper returns all the selected records of the data source that you pass to it.
Hi nmaenpaa
What i m meaning is why i m getting in my info the good values, but when i m reaching the form i m having only one of those seleted rows.
What i wanna do is only having in the child form the seleted values i select before in the parent form
Is there an easy way do that without query or filtering, cause i wanna get the same values but in a new form
Hi,
I'm not sure if I understand your question. Are you sure that you're debugging the correct thing? In your screenshot we can see a breakpoint that has nothing to do with the MultiSelectionHelper that you initialize later in the code.
You also say "When i put an info in the while loop, i'm getting displayed the good values selected.", which seems to indicate that the MultiSelectionHelper works correctly. But I can't be sure, since your screenshot doesn't contain any code that would print to infolog.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156