Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

Disable user from manually entering/pasting values in a string control where also the input is coming from the barcode scanner.

(1) ShareShare
ReportReport
Posted on by 125

Hi Everyone, 

We have a customization on Inventory counting journal form where a custom string field is developed. On its modified field event, we are using barcode scanner device that scans the item barcode and update the Counted column value in counting journal lines for that item.

Client requirement is to disable/hide that field from user input and only input allowed from the bar code scanning function. But by disabling the field or setting the allow edit field also stops the barcode scanning operation as well. 

According to our findings till now that it is possible to capture the keyPress , KeyUp , KeyDown  events BUT that is for C# based applications. those events are not available in D365. 

Please share ideas or possible solutions if there is any event that can be captured or a way through which we can identify the input is coming from the user key Board or he is copy/pasting the values in that field. 

  • Suggested answer
    Mohit Rampal Profile Picture
    12,558 Moderator on at
    RE: Disable user from manually entering/pasting values in a string control where also the input is coming from the barcode scanner.

    Hi Muhammad, You can try textChange() method to add validations, it will only be called when user manually typing into the field

    check this out

    www.dynamicsuser.net/.../9

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: Disable user from manually entering/pasting values in a string control where also the input is coming from the barcode scanner.

    On the form string control property try setting property "Lookup Only" to Yes. It will restrict user from entering the values.

    Thanks,

    Girish S.

  • Luqman Profile Picture
    125 on at
    RE: Disable user from manually entering/pasting values in a string control where also the input is coming from the barcode scanner.

    Thanks for the response.

    But user will have the barcode value, that he can simply type in the text box. setting password style will not restrict him from entering the value in that text box. Whereas our core requirement is to restrict user manual input in that field.

    Regards.  

  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: Disable user from manually entering/pasting values in a string control where also the input is coming from the barcode scanner.

    Hi Muhammad Luqman,

    On the string control under design node - Try setting the property "Password style" to Yes and check.

    I think that will restrict the copy paste functionality. Just give it a try.

    Thanks,

    Girish S.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,060 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,858 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans