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 :
Microsoft Dynamics AX (Archived)
Suggested Answer

what is meant by forceliteral and force placeholder

(0) ShareShare
ReportReport
Posted on by 55

tell me what is meant by firstonly,firstfast,forceliteral,forceplaceholder.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Denis Patrakov Profile Picture
    on at

    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

  • Abishek_06 Profile Picture
    165 on at

    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:

    static void firstfind(Args _args)

    {

       SalesTable salestable;

       ;

        while select  firstonly * from salestable index hint CustIdx where salestable.CustAccount == "124578"

       info(strfmt("The output is %1",salestable.SalesName));

    }

    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.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans