Hi friends,
Do someone know how to convert records from Set Type to Int ?
Thanksfully.
Thank you very much ... i didnt figure how to do 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); }
Yes that what i want to do ... but i'm still newbie on D365 and i dont find the right way to code that
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 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
So you have a set of records, and you want to get recIds of those records?
Did I understand correctly?
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
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.
André Arnaud de Cal...
292,160
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156