Skip to main content

Notifications

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.

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
    Mohit Rampal 12,547 Super User 2024 Season 1 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
    GirishS 27,832 Super User 2024 Season 1 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
    Luqman 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
    GirishS 27,832 Super User 2024 Season 1 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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans