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

Set dialog value based on other dialog UI Builder x++

(1) ShareShare
ReportReport
Posted on by 2
I have created a dialog using lookup button table name (Calendar ), and two from date and to date contracts , as soon as i select the value in calendar lookup table , from date and to date values should be updated from as per field selected in calendar table i.e month start date in fromdate and month end date in todate
/// <summary>
/// ClaimManagementUIBuilder - UI Builder Class
/// </summary>
[DataContractAttribute,SysOperationContractProcessingAttribute(classStr(ClaimManagementContract),
SysOperationDataContractProcessingMode::CreateUIBuilderForRootContractOnly)]
class ClaimManagementUIBuilder extends SysOperationAutomaticUIBuilder
{
    DialogField     dialogPeriod,dialogFromDate,dialogToDate;

    
    /// <summary>
    /// lookup of customer account
    /// </summary>
    /// <param name = "_control">FormStringControl</param>
    public void lookupCokePeriod(FormStringControl _control)
    {
        SysTableLookup                      sysTableLookup;
       
        sysTableLookup = SysTableLookup::newParameters(tableNum(OEI1CokeCalendar), _control);
           
        sysTableLookup.addLookupfield(fieldNum(Calendar, Quarter));
        sysTableLookup.addLookupfield(fieldNum(Calendar, MonthStartDate));
        sysTableLookup.addLookupfield(fieldNum(Calendar, MonthEndDate));
        sysTableLookup.performFormLookup();
    }

    public void postBuild()
    {
        super();

        dialogPeriod        = this.bindInfo().getDialogField(this.dataContractObject(),
                          methodStr(OEI1_ClaimManagementContract, parmPeriodMonthly));

        dialogPeriod.registerOverrideMethod(methodStr(FormStringControl,lookup),
                        methodStr(OEI1_ClaimManagementUIBuilder, lookupCokePeriod),this);

        dialogPeriod.control().mandatory(true);

        dialogFromDate      = this.bindInfo().getDialogField(this.dataContractObject(),
                          methodStr(OEI1_ClaimManagementContract, parmFromDate));

        dialogFromDate.allowEdit(false);

        dialogToDate        = this.bindInfo().getDialogField(this.dataContractObject(),
                          methodStr(OEI1_ClaimManagementContract, parmToDate));

        dialogToDate.allowEdit(false);
                    


    }

}
 
I have the same question (0)
  • Waed Ayyad Profile Picture
    9,074 Super User 2026 Season 1 on at
    Hi,
     
    You can utilize the registerOverrideMethod and add modified method to dialogPeriod , also you can check the following link it has the same idea:
     
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
  • Layan Jwei Profile Picture
    8,165 Super User 2026 Season 1 on at
    Hi,
     
    There was a similar question before. It was about ssrs uiBuilder but it's still the same.
    So you need to registerOverride the modified method of the calendar field in the postRun method..and inside the method you can set the values.
     
    So maybe sth like that:
     
    public void postRun()
    {
        super();
     
        // Override modified method
        dialogPeriod.registerOverrideMethod(methodStr(FormStringControl, modified),methodStr(OEI1_ClaimManagementUIBuilder, cokePeriod_modified),this);
    }
     
    private boolean cokePeriod_modified(FormStringControl _control)
    {
        this.modifyDialogFields();
     
        return _control.modified();
    }
     
    private void modifyDialogFields()
    {
        dialogFromDate.value(//put the value u want here);
        dialogToDate.value(//put the value you want here);
    }
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Waed Ayyad Profile Picture
    9,074 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
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 438

#3
Adis Profile Picture

Adis 261 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans