Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

how to add a new parameter to output Menu reports in dynamics 365 for finance and operations

(0) ShareShare
ReportReport
Posted on by 394
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());    }}
 
  • Martin Dráb Profile Picture
    233,009 Most Valuable Professional on at
    how to add a new parameter to output Menu reports in dynamics 365 for finance and operations
    This thread will be deleted, because it's a duplicate of How to add a new parameter to output Menu reports.
     
    Also, it's in a wrong forum - it's about F&O and not about Dynamics 365 in general. When you ask in the right forum, you also don't need to add "in dynamics 365 for finance and operations" to the title.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,009 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans