Announcements
No record found.
tell me what is meant by firstonly,firstfast,forceliteral,forceplaceholder.
*This post is locked for comments
These are hints and query modifiers that affect 1) which query plan a DBMS uses, 2) how AX creates queries. See also Select Statement Syntax
First Only:
The word first only denotes to fetch first record only. Let me show an example with firstonly keyword and without firstonly keyword
Example without Firstonly keyword:
static void firstfind(Args _args)
{
SalesTable salestable;
;
while select * from salestable index hint CustIdx where salestable.CustAccount == "124578"
info(strfmt("The output is %1",salestable.SalesName));
}
If you run the above code it will display all salesname based on condition(Equal To) mentioned . . Here you will get all the records as output that satisfy the condition.
Example with Firstonly keyword:
while select firstonly * from salestable index hint CustIdx where salestable.CustAccount == "124578"
If you the run the above code it will all records based on condition(Equal to) mentioned and will return the first record from the condition satisfied. So you will get only one record as output.
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.
Pratik Bhosle 2
Giorgio Bonacorsi 1