Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

get() Method

(0) ShareShare
ReportReport
Posted on by
Hi all,
 
When we using get() in below code it is getting single record and storing it in the Table buffer
 
But when we are using get() method it should get entire table data and store it in the Table buffer
 
I am unable to understand logic 
 
Kindly give me an example
 
Thanks!
 
while(qr.next())
{
  custTable = qr.get(tableNum(CustTable));
}

 

 

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,816 Super User 2024 Season 1 on at
    get() Method
    While(qr.next()) will loop all the records one by one. So, get method will get only one whole data at a time. You won't get all the table data in a single go. Thats the reason why you are using QueryRun to pass the query to it and loop the output of query line by line.
     
    Thanks,
    Girish S.
  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,550 Super User 2024 Season 1 on at
    get() Method
    Hi, get method will not store entire data in a table data but only one record, it will fetch the current (one) table record fulfulling query creteria. The specified code will run for all valid records. Suppose there are 10 records in query, your code will run 10 times and get method will fetch each record. Every time, custTable table buffer will be overrided by new table record. This approach is used to iterate all records and perform some operations on that records, one by one. 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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans