web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Multi-Select Lookup Values Lost in DataContract List in SysOperation Report

(4) ShareShare
ReportReport
Posted on by 8

I’m experiencing an issue with multi-select lookups in a SysOperation report in Dynamics AX / Dynamics 365 F&O. I have a report with a UIBuilder and a DataContract where three parameters are defined as

List: parmProjInvoiceId, parmWhsCode, and parmItemId. Only parmProjInvoiceId works correctly; the other two lose their values.

 

For example, the contract definition for ItemId is:

[DataMemberAttribute('ItemId'),
 AifCollectionTypeAttribute('_itemId', Types::String),
 SysOperationLabelAttribute("@Labels:InventItemId")]
public List parmItemId(List _itemId = itemId)
{
    itemId = _itemId;
    return itemId;
}
 

In the UI, the multi-select lookup works correctly: the _control.text() contains all selected items separated by semicolons, e.g., "item1;item2;item3". However, when the report framework calls the parmItemId() method before processReport(), the _itemId parameter contains only the first item, and the rest are lost.

 

Here is an example of how the multi-select lookups are configured in the UIBuilder:
 
private void InventItemIdLookUp(FormStringControl _control)
{
    QueryBuildDataSource qbdsItemId;
    container itemIdContainer;
    Query query = new Query();
    qbdsItemId = query.addDataSource(tableNum(InventItemIdLookupSimpleView));
    qbdsItemId.addSelectionField(fieldNum(InventItemIdLookupSimpleView, ItemId));
    qbdsItemId.addSelectionField(fieldNum(InventItemIdLookupSimpleView, NameAlias));
    qbdsItemId.addSelectionField(fieldNum(InventItemIdLookupSimpleView, ItemType));
    itemIdContainer = [tableNum(InventItemIdLookupSimpleView), fieldNum(InventItemIdLookupSimpleView, ItemId)];
    SysLookupMultiSelectGrid::lookup(query, _control, intentItemControl, _control, itemIdContainer);
}
 
 

Debugging shows that initially, when parmItemId() is first called, the _itemId list contains all the selected values. At a later point, right before processReport(), the framework calls parmItemId() again and passes only the first value, effectively overwriting the full list with a single item.

 

I haven’t been able to determine why the SysOperationFramework is dropping the additional values from the list, even though the UI shows them correctly.

I don't know how to resolve this problem, can you help me pls? 

Categories:
I have the same question (0)
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,
     
    Can you show us your code of UI and Contract classes? based on your debugging, what is the method that overriding the parmItemId()?
    Do you have any code in the controller class that override the contract parameters?
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

     
     
  • Suggested answer
    Vigneshvaran Profile Picture
    356 on at
    Please try to use as per the below mentioned link and let me know further if any issues on that.
     
  • Sagar121 Profile Picture
    1,158 Super User 2026 Season 1 on at
    Hi, Can you please share UI Builder code ?
  • Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at

    Hi, 

    Is your issue resolved? If yes, mark the answers that helped you as verified. 

    Thanks,

    Waed Ayyad

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans