Announcements
No record found.
Hi, I have a contract class with a reference control that shows the fiscal calendar period. This control has a lookup and when a record is selected, it displays the selected record with 3 fields like this
I need to modify the replacement field group property of the reference control in UI Builder class to show only one field. Is it possible? I know that in a form you can choose the displayed fields changing the property replacement field group.
Hi Carlos,
Please check the old thread for the same topic:
community.dynamics.com/.../how-to-use-lookup-form-in-ui-builder-and-get-recid
It cannot be done using any property or through code.
You need to override the lookup method to show only single fields to.
If it doesn't work add a string control and add a look up to it.
Thanks,
Girish S.
You should be able to pass a value to replacementFieldGroup() method of FormReferenceGroupControl.
Here is (the only) example from the standard application:
referenceGroupControl.replacementFieldGroup(tableFieldGroupStr(FinTag, DisplayValue));
There is indeed a function ReplacementFieldGroup() for doing this,
Thank you Martin, this is what I needed.
Here is the code I wrote:
public void build()
{
super();
df_fiscalCalendarPeriodRecId = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(GeneratePortfolioProposalContractIND, parmFiscalCalendarPeriodRecId));
FormBuildReferenceGroupControl formBuildReferenceGroupControl = df_fiscalCalendarPeriodRecId.control();
formBuildReferenceGroupControl.replacementFieldGroup(tableFieldGroupStr(FiscalCalendarPeriod, FiscalPeriod));
}
Re-posted with correct indentation and line spacing:
public void build() { super(); df_fiscalCalendarPeriodRecId = this.bindInfo().getDialogField( this.dataContractObject(), methodStr(GeneratePortfolioProposalContractIND, parmFiscalCalendarPeriodRecId)); FormBuildReferenceGroupControl refGroupControl = df_fiscalCalendarPeriodRecId.control(); refGroupControl.replacementFieldGroup(tableFieldGroupStr(FiscalCalendarPeriod, FiscalPeriod)); }
Please always use Insert > Code (in the rich-formatting view).
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 545 Super User 2026 Season 1
Giorgio Bonacorsi 408
Adis 267 Super User 2026 Season 1