About commas in an OptionString

poppinspoppins Member Posts: 647
edited 2014-12-04 in NAV Three Tier
Hi everyone,

Sometimes in an OptionString we have something like that:
 ,Payment,Invoice,Credit Memo,Finance Charge Memo,Reminder,Refund,,,,,Bank Reverse,Bank Charge,Loan Pay Out,Loan Pay Back
What do those successive commas mean?
Thanks in advance :mrgreen:

Comments

  • tinoruijstinoruijs Member Posts: 1,226
    poppins wrote:
    Hi everyone,

    Sometimes in an OptionString we have something like that:
     ,Payment,Invoice,Credit Memo,Finance Charge Memo,Reminder,Refund,,,,,Bank Reverse,Bank Charge,Loan Pay Out,Loan Pay Back
    
    What do those successive commas mean?
    Thanks in advance :mrgreen:

    It is used for future use. So if in the future someone decides they need an extra option, there's space before "Bank Reverse" in this case.
    It's because an option is an integer. Payment equals 1 because it's after the first comma.
    Invoice equals 2.
    When you would insert a new type before invoice, invoice would now be 3. And this means trouble... Never do that! That's why there are those comma's. :)

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • poppinspoppins Member Posts: 647
    tinoruijs wrote:
    It is used for future use. So if in the future someone decides they need an extra option, there's space before "Bank Reverse" in this case.
    It's because an option is an integer. Payment equals 1 because it's after the first comma.
    Invoice equals 2.
    When you would insert a new type before invoice, invoice would now be 3. And this means trouble... Never do that! That's why there are those comma's. :)
    Ah :!:
    Why not just insert the new option in the end of the OptionString, I mean after Loan Pay Back ? Why keep space for this ?
  • CyberghostCyberghost Member Posts: 46
    Say that the standard Microsoft option was

    Quote, Order, Invoice

    and you wanted to add Blanket to it. If you have

    Quote, Order, Invoice,,,,,,,,,,Blanket

    that leaves space for Microsoft to add additional options with you having to do any recoding when they overwrite yours. E.g. if Microsoft added Credit to the list, it would look like

    Quote, Order, Invoice, Credit,,,,,,,,,Blanket

    Whereas if you had put Blanket in straight after, Blanket would have been overwritten with Credit.

    Hope this helps
    "When you eliminate the impossible, whatever remains, however improbable, must be the truth" - Sherlock Holmes

    "God and developers are in a constant battle. Developments to make their applications more idiot-proof, and God to produce bigger idiots!"
  • bbrownbbrown Member Posts: 3,268
    Because it may be a standard option field to which you have added custom choices. You need to account for the possibility that Microsoft may add choices. So when you merge your choices they remain the same.
    There are no bugs - only undocumented features.
Sign In or Register to comment.