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, ...
Unanswered

How to add a new parameter to output Menu reports

(0) ShareShare
ReportReport
Posted on by 405
I have already tried to do this by adding an extension to the /Contract Class/ in the AOT, and it was successful as this parameter was displayed during the execution of this report in the Output Menu. However, when I try to program this parameter in the UIBuilder Class so that I fill this parameter with specific values ​​through a query, I face an error message that appears as /Value cannot be null. Parameter name: key/.
 
My Contract Class:
[ExtensionOf(classStr(LedgerTransStatementContract))]final class LedgerTransStatementContract_Sitcom_Extension{    public List DataAreas;    [        DataMemberAttribute('DataAreas'),        AifCollectionTypeAttribute('DataAreas', Types::String),        SysOperationLabelAttribute(literalStr(/Data Area/)),        SysOperationDisplayOrderAttribute('1')    ]    public List parmDataAreas(List _DataAreas = DataAreas)    {        DataAreas = _DataAreas;        return DataAreas;    }}
 
 
My UIBuilder Class:
[ExtensionOf(classStr(LedgerTransStatementUIBuilder))]final class LedgerTransStatementUIBuilder_Sitcom_Extension {    public DialogField dialogDataArea;    public LedgerTransStatementContract_Sitcom_Extension contract;    public void postBuild()    {        next postBuild();        contract = this.dataContractObject() as LedgerTransStatementContract_Sitcom_Extension;        dialogDataArea = this.bindInfo().getDialogField(contract, methodStr(LedgerTransStatementContract_Sitcom_Extension, parmDataAreas));        dialogDataArea.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(LedgerTransStatementUIBuilder_Sitcom_Extension, GetDataArea), this);        if(dialogDataArea)        {            dialogDataArea.lookupButton(2);        }    }    private void GetDataArea(FormStringControl _control)    {        Query query = new query();        QueryBuildDataSource qbds = query.addDataSource(tableNum(CompanyInfo));        qbds.fields().dynamic(false);        qbds.fields().clearFieldList();        qbds.addSelectionField(fieldNum(CompanyInfo, DataArea));        SysLookupMultiSelectGrid::lookup(query,_control, _control, _control, conNull());    }}
 
I have the same question (0)
  • Martin Dráb Profile Picture
    238,769 Most Valuable Professional on at
    Which line of code is throwing the error?

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
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans