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

Differences of single quotes and double quotes for text string

(0) ShareShare
ReportReport
Posted on by

Hi all,

Any differences if we use single quotes or double quotes for text string ?

For example in variable assignment or in select query condition ?

Is there any rule, lets say Best Practice rule for this ?

Thanks,

V

I have the same question (0)
  • Mingzhou Deng Profile Picture
    on at

    There is no difference in x++ code.

  • Blue Wang Profile Picture
    on at

    HI VoltesDev,

    Supplement to mingzhou's reply, please refer to this:

    6518.PNG

    https://docs.microsoft.com/en-us/dynamicsax-2012/developer/x-csharp-comparison-string-case-and-delimiters

  • VoltesDev Profile Picture
    on at

    Hi Blue,

    I think it is different. I'm sorry, but I had to ask is the document you're sharing has a updated one that more comply with F&O current version ?

    My finding is for text string use for variable / field assignment and X++ select query it is better to use single quotes, so it will not break BP Rule for Label Id.

    Thanks,

  • Blue Wang Profile Picture
    on at

    Hi VoltesDev,

    Yes, there are specific situations that will make a difference.

    For example, constants, or expressions in the query range use single quotes.

    You can find some from here:

    https://docs.microsoft.com/en-us/dynamicsax-2012/developer/x-standards-constants

    http://www.axaptapedia.com/Expressions_in_query_ranges

  • Blue Wang Profile Picture
    on at

    Hi Voltes,

    Sorry, the link in the first reply is earlier, you can see this: docs.microsoft.com/.../xpp-cs-comparison

    Search "Single" in Doc, you will find a lot.

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 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans