Display Referance Data

Certified Lead Developer
Hi,
I have below scenarion , I am looking for some design practices for it

I have Employee list in Employee CDT

--------------------------------------

Employee
----------
empId
firstName
lastName
designationId



Designation
---------------
designationId
designationDescription


I want to show employee empId,firstName,designationDescription in grid.
Whats are the best possible solution to show designationDescription in grid with minimum number of database calls.

Below are some solution approach i have in my list
1. Create view for Employee Details
Cons:
1. Need to create extra view and CDT
2. Pass designationId list and get designationDescirption
Cons:
Desgination desciption might not come in sorted order of desgination id for in operator

OriginalPostID-261448

  Discussion posts and replies are publicly visible

Parents
  • I would prefer to use view in this case as you are just relating one item but if there are many properties like designation, location...more than 5 or 6 (lookups)and number of records in lookup/s are less (if less than 10-15 for each type ) and you are planning to show/bring 20-50 transnational records at once out of 10000 records (employees in your case) then one of the option is to fetch all lookups into local variables on load and do mapping local variables to Ids on currently displaying list in the grid dynamically (within with). In that case you are just bringing small set of lookup data only once and applying it to transaction data just before when you are showing it which is better than executing a view every time. However if lookup records are more than 100 then it is better to go with view as rules/forms need more memory to execute.
Reply
  • I would prefer to use view in this case as you are just relating one item but if there are many properties like designation, location...more than 5 or 6 (lookups)and number of records in lookup/s are less (if less than 10-15 for each type ) and you are planning to show/bring 20-50 transnational records at once out of 10000 records (employees in your case) then one of the option is to fetch all lookups into local variables on load and do mapping local variables to Ids on currently displaying list in the grid dynamically (within with). In that case you are just bringing small set of lookup data only once and applying it to transaction data just before when you are showing it which is better than executing a view every time. However if lookup records are more than 100 then it is better to go with view as rules/forms need more memory to execute.
Children
No Data