Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Issue with Custom Field Lookup in InventSerialIdLookup Form

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

I need help with adding a custom field called YearCreated to the InventSerialIdLookup form. Here is an overview of the situation:

  • The InventSerial table is already a datasource on the form, so I decided to add the field to this table.
  • There are two grids on the form. I have added the YearCreated field to the first grid where the datasource is InventSerial, and mapped the field with the InventSerial datasource. The lookup is working fine, and the YearCreated value is displaying correctly.
  • However, I am facing issues with the second grid where the datasource is InventDimItem. I have added the YearCreated field to this grid and bound it with the InventSerial datasource, but the lookup shows incorrect values.
  • I have also tried creating a view and joining the view as a datasource, but the values are still incorrect.

I need guidance on how to resolve this issue. Note: I do not want to use a display method because the requirement is for the user to filter the data.

Can someone please check these details and correct me if I am wrong or suggest a solution?

 

 

 

 

 

 

 

 

 

 

 

  • Suggested answer
    Raj Borad Profile Picture
    1,091 on at
    Issue with Custom Field Lookup in InventSerialIdLookup Form
    Hi,
     
    I think you are trying to display `YearCreated` from `InventSerial` inside `GridItem`, which uses `InventDimItem` as the datasource. Since `YearCreated` belongs to a different table, simply binding it won’t work unless there's a proper relationship or join. 
     
    To resolve this while supporting filtering and sorting, the best approach is to create a view that joins `InventDimItem` and `InventSerial` using a common key. Add this view as a new datasource on the form and link it to `InventDimItem`. 
    Then, bind `YearCreated` in `GridItem` to the view’s datasource. 
     
    If you need the column for filtering the data, then don't use Display method. 
     
    Thanks,
    Raj D Borad
  • Suggested answer
    Jonas "Jones" Melgaard Profile Picture
    3,806 Super User 2025 Season 1 on at
    Issue with Custom Field Lookup in InventSerialIdLookup Form
    That won't work. Two completely different data sources with no relations. First one InventSerial, second one InventDim.
     
    You need to rethink how to solve this requirement. I haven't taken the time to make an example for you, but you need to either add a display method to the grid like the other fields, or add a new "InventSerial" table and join it to the InventDimItem datasource. Hope it makes sense.
  • Suggested answer
    Holly Huffman Profile Picture
    6,078 on at
    Issue with Custom Field Lookup in InventSerialIdLookup Form
    Good morning, afternoon, or evening depending on your location!
     
    It looks like the issue stems from how the InventDimItem datasource is interacting with the InventSerial table. Since the lookup works correctly in the first grid (where the datasource is InventSerial), but not in the second grid (where the datasource is InventDimItem), here are a few things to check:
    Possible Solutions
    1. Ensure Proper Relations Between InventDimItem and InventSerial
      • Verify that there is a direct relation between InventDimItem and InventSerial in the data model.
      • If there isn’t a direct relation, consider adding a join between these tables in a query or a view.
    2. Use a Query Instead of Direct Binding
      • Instead of binding the YearCreated field directly to InventSerial, try creating a query that joins InventDimItem with InventSerial using a common key (such as InventSerialId).
      • Then, use this query as the datasource for the second grid.
    3. Check Field Mapping in the Second Grid
      • Ensure that the YearCreated field in the second grid is correctly mapped to the InventSerial datasource.
      • If the lookup is pulling incorrect values, it might be referencing the wrong field or missing a proper filter.
    4. Verify Lookup Form Configuration
      • If the lookup is not filtering correctly, check the lookup query and ensure it is correctly filtering based on the selected record in InventDimItem.
      • You may need to override the lookup() method for the field to refine the query.
     
    Hope this helps!

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 Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 243

#2
Martin Dráb Profile Picture

Martin Dráb 190 Most Valuable Professional

#3
Adis Profile Picture

Adis 144 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans