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

Reference Group Lookup field displays nothing

(0) ShareShare
ReportReport
Posted on by
Greetings to everyone.
 
Right now I'm stuck or in a bind programming a reference group lookup field in a customized form for Dynamics 365 F&O.
 
I am creating a list page style form that will be displaying the summarized information for activities done by customers and assigned by employees. One of my columns is a reference group lookup field that has to display the name of the employee assigned to each activity, however, the field is showing in blank.
 
As a datasource to my customized form I added the smmActivities table, then, dragged and dropped the ResponsibleWorker field into a grid in my form. Furthermore, I checked into the properties of the field and set the Replacement Field Group  selecting Person, which corresponds to the field group of the same name in the HcmWorker table. Moreover, the field ResponsibleWorker is a data type Int64 field that acts as the foreign key in smmActivities table to relate to the HcmWorker table. 
 
//////
 
//////
 
//////
 
//////
 
In turn, I checked both the relationships, indexes, and properties in the HcmWorker table:
- For the replacement key property is set to HcmWorker_AK2.
- The index HcmWorker_AK2 is set as an alternate key allowing no duplicates. This key is composed of the fields: PersonnelNumber and Person.
- The Person field is a data type Int64 field that acts as the foreign key in HcmWorker table to relate to the DirPerson table.
- The Person field is assigned DirPartyRecId as its Extended Data Type property.
 
//////     //////
 
Following, I checked the properties of the EDT DirPartyRecId:
- Has DirPartyTable assigned as the Reference Table.
- The Node Table Reference has set the relation: DirPartyRecId == DirPartyTable.RecId
 
//////
 
Having checked everything is in order, then I debugged my form to test if the lookup field was working, but the field was displaying blank values and it wasn't.
 
Next, I tried overriding the lookupReference method on my form's datasource field where I want to perform the lookup on with the following code.
public Common lookupReference(FormReferenceControl _formReferenceControl)
{
                SysReferenceTableLookup sysReferenceTableLookup;
                Query query;
                QueryBuildDataSource queryBuildDataSource;
                QueryBuildRange queryBuildRange;

                sysReferenceTableLookup = SysReferenceTableLookup::newParameters(tableNum(HcmWorker), _formReferenceControl);
                sysReferenceTableLookup.addLookupMethod(tableMethodStr(HcmWorker,name)); 
 
                query = new Query();
 
                queryBuildDataSource = query.addDataSource(tableNum(HcmWorker));
                queryBuildRange = queryBuildDataSource.addRange(fieldNum(HcmWorker, RecId));

                queryBuildRange.value(queryValue(smmActivities.ResponsibleWorker));
                sysReferenceTableLookup.parmQuery(query);

                return sysReferenceTableLookup.performFormLookup();
}
 
Still, it is not working and the field still is displaying blank values.
 
//////
 
I have researched and googled every article on the subject then tried each method, but the field is not working.
 
Hence, I am requesting anyone to point me out whether I missed something or used a wrong approach in order to get the desired result.
I have the same question (0)

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans