Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Special Characters in BC

(0) ShareShare
ReportReport
Posted on by 251

Hey,

What special characters can not be used in BC?  i.e any of the following...!@#$%^&*()= in item creation, job creation etc. or in BC totality 

Thanks!

  • Dev-Master Profile Picture
    Dev-Master 65 on at
    RE: Special Characters in BC

    Yes thank you it worked for me. but i am getting exception if the product name is like this  DS-2CD2132F-IW(4MM).

    It give exception of

    The length of the string is 22, but it must be less than or equal to 20 characters. Value: @*DS-2CD2132F-IW(4MM)*

    How to solve this?

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Special Characters in BC

    Hi,

    I have used only simple setfilter function only the catch is I have provided the values extracting from the function STRSUBSTNO with special characters in between of @* string*

    please check if it works for you 

  • Dev-Master Profile Picture
    Dev-Master 65 on at
    RE: Special Characters in BC

    Hi thank you for your response.

    Can you please elaborate working of this filter. I am new in business central so i just know basic understanding of set filter function.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Special Characters in BC

    Hi,

    Try like this

    itemRec.SetFilter("No.", '%1',StrSubstNo('@*%1*', ProductName));

  • Dev-Master Profile Picture
    Dev-Master 65 on at
    RE: Special Characters in BC

    Hi, I am going in a situation where i have product name with special character like 1001-B(101) .

    as i am already using the .filter function with filter criteria of ignore case 

    itemRec.SetFilter("No.", StrSubstNo('@%1*', ProductName));
    it gives error The filter "@(" is not valid for the No. field on the Item table. An error occured while interpreting the filter: Did not expect '('.
    when i apply this filter.
    itemRec.SetFilter("No.", StrSubstNo('*%1*', ProductName));
    and try to search with this filter it gives error "The filter "*(*" is not valid for the No. field on the Item table. An error occured while interpreting the filter: Did not expect '('.
    How can i apply both ignore case filter '@' and any special charter in the item name for product name searching like 1001-B(101).
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,094 Super User 2024 Season 2 on at
    RE: Special Characters in BC

    Hi, there are not too many restrictions in BC. I recently discovered that you can even enter emoticons in the code field and text field.

    For example:

    pastedimage1631058251720v1.png

    pastedimage1631058262559v2.png

    But for system developers and administrators, I definitely don’t want to use these special characters.
    Hope the following link will help.

    How to prevent users from entering special characters inside an input field: https://yzhums.com/5734/

    Thanks.

    ZHU

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans