web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Grid Control on form and use of display method and while

(0) ShareShare
ReportReport
Posted on by 515

Dear Experts

Hope all are fine and safe.

Need your support to solve the issue

I have two tables

Frequncy master-Item id, frequency

Inventsserial-Itemid, status, sub part id(1 item id in frequency master can have many sub part id)

I have new customized form where

item id, countoftstatus(taken from inventserial like machine, available, issued etc) 

I want to get count of subpart which are due in last 15 days(today-15 dayd back) and display on grid

The issue is

in display method if i write while select table a join table b where iitemid==itemid , and put that display on grid, the form takes time to load and also the grid flcikers

If i add addcachemethod in the init of form datasorce the user cannot open the form(not sure what cacheaddmethod has to do with user opening forms)

can you please tell me how can i use while loop in display method and also make sure the form dont take time to load and the grid is not blining(the grid only blinks because of while loop and while loop use only retrives correct values)

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi,

    Could you please share the code you are using for display method?

    Is the code at the form level or at the table level?

    Also, why are you using while select? Can you not do a count(recId)

    Counter numofSubPart;
    
    slect count(RecId) from table A
        join tableB where tableB.ItemId == tableA.ItemId;
      
    numofSubPart = tableA.RecId;
    
    return numofSubPart;
    

  • NDingankar22 Profile Picture
    515 on at

    Thanks for the quick reply. I have written the diplay method on the frequency master same like above

    However if i use the select loop it dont retrieves value as it dnt loop through all records hence using the while loop ig loops through all the reords

    how do i loop the records if not use of while

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Please share the code you have currently so that we can look for a solution.

  • vinitgoyal2005 Profile Picture
    6,332 on at

    Hi,

    Share your code so it is easier for us to help you.

  • MuthukumaranAX Profile Picture
    2,903 on at

    Hi - instead of using join, can you try using exist join and check the code.

    thanks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans