Announcements
No record found.
Hello,
I have a custom Form with two Foreign keys ProdRoute.OprId and RouteCostCategory.CostCategoryId which I am linking toghether in the custom table as well. I just want to modify the standard lookup field for the EDT RouteCostCategoryId to add the Description of that cost category which is in the Share Categories table (SharedCategory.CategoryName)
Even better make a copy of the EDT and then modify it so it can show the CategoryName
Thanks a lot!
Hi CBNestor,
I think the easiest solution (if you don't need to filter or sort by this field in lookup) is to add new display method on RouteCostCategory to return category name and added to AutoLookup field group on RouteCostCategory table as well.
Otherwise, you will need to implement custom lookup using sysTableLookup class (check InventLocation.lookup* methods and how they used)
HI CBNestor,
As mentioned, the display method should suit your needs.
You need to check how the lookup of the Category field is implemented, only add another field. please check this thread for the logical method.
community.dynamics.com/.../348223
Hi Blue,
This is what I would like to know where is that implemented orginally where can I find the code.
Hi Sergei,
I have the display on RouteCostCategory. I dont see any fields in the RouteCostCategory AutoLookup fGroup. how to add that. thank you
Display CategoryName GetCategoryName()
{
SharedCategory _sc;
select CategoryName from _sc
where _sc.CategoryId == this.CostCategoryId;
return _sc.CategoryName;
//return _sc.find(this.CostCategoryId).CategoryName;
}
Just drop needed fields to the group (from fields node) and display method from methods node.
if you don't need to filter anything on this field then I suggest to use display method. Else you need to develop custom lookup as suggested by sergei.
No the CostGroupId is gone. Thats why I wanted to make some kind of copy of the lookup, customize it and the use it in my custom form. I dont want to change the whole Lookup in whole system
Hi CBNester,
You need to add fields CostCategoryId and CostGroupId to the field group as well.
I know what you mean, Yes now I am change the Standar lookup field. I can show the all 3 fields now. But if I want to leave the standard lookup as it is. I make one on my own. So I can show the 3 fields just when and where I want to. Is it possible to make some kind of a copy and customize from that copy?
Yes, in this case you need to use sysTableLookup class and lookup method on form datasource field. Check InventLocation.lookupBySiteId method and how it's used.
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... 509 Super User 2026 Season 1
Giorgio Bonacorsi 375
Adis 268 Super User 2026 Season 1