Hi friends,
Do someone know how to convert records from Set Type to Int ?
Thanksfully.
Hi,
could you share any more details about your actual requirement? I'm sure there's some actual scenario/issue that you're working with.
Sets, records and integers are three completely different things (and can't be converted to each other) so at least I don't understand the question.
Yes i wanna pass from form A args().parmObject(SetRecords); to another form B
And then i wanna try to gives to recId values of the SetRecords that i got
So you have a set of records, and you want to get recIds of those records?
Did I understand correctly?
Yes i was doing that on form A :
eukSelectedMenus = selectionHelper.getFirst(); if (eukSelectedMenus.RecId) { while (eukSelectedMenus.RecId != 0) { selectedRecords.add(eukSelectedMenus); eukSelectedMenus = selectionHelper.getNext(); } } args.parmObject(selectedRecords); //Assign to args values
My problem is to get that values on form B and deal with it to make some query on RecId for example
I'm still not sure that I understand.
If you need to access selected records of form A on form B you can do it directly by using the caller data source. You don't need any sets.
Anyway, if you have a set of records, and you want to also have a set of rec ids of those records, you should be able to solve it by using your current skills. Just fetch each record from the set, and add it's RecId to another set (of type Int64).
Yes that what i want to do ... but i'm still newbie on D365 and i dont find the right way to code that
SetEnumerator setEnum = setOfRecords.getEnumerator(); // setOfRecords is the one that you have Set setOfRecIds = new Set(Types::Int64); while (setEnum.moveNext()) { MyRecord myRecordLocal = setEnum.current(); setOfRecIds.add(myRecordLocal.RecId); }
Thank you very much ... i didnt figure how to do that
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 1,922
André Arnaud de Cal... 835 Super User 2025 Season 2