Open Forum

Expand all | Collapse all

Disable/prevent manual entry in SOP Number field

  • 1.  Disable/prevent manual entry in SOP Number field

    TOP CONTRIBUTOR
    Posted Feb 25, 2020 03:13 PM
    For a number of reasons we want users to access existing Sales Transactions from smartlists rather than keying in the sales order number in the sales form, which they don't always enter correctly.

    Smartlists ensure that they are choosing the correct sopnumber and in turn the correct information is presented to the user.

    Because sop numbers are auto assigned there should be no need for direct entry into the sop number field.

    Question, I know it is a required field, but is there a way to keep users from actually being able to enter a sopnumber since the system or smarlists populate already?

    Thanks

    ------------------------------
    Jeff Roe
    Kele Inc
    Bartlett TN
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Disable/prevent manual entry in SOP Number field

    TOP CONTRIBUTOR
    Posted Feb 25, 2020 06:05 PM
    Since it's required, I don't think there are any options other than serious customization. I tried Field Level Security just out of curiosity but it won't work because of the require status.


    ------------------------------
    Charles Allen
    Senior Managing Consultant
    BKD Technologies
    Houston, TX
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Disable/prevent manual entry in SOP Number field

    GPUG ALL STAR
    Posted Feb 26, 2020 03:11 AM
    @Jeff Roe

    A quick customisation with GP Power Tools could deal with this.  Depending on how complex you want to go.  If it is just disabling the field, it should take less than 5 minutes.

    Regards

    David​​

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Disable/prevent manual entry in SOP Number field

    GOLD CONTRIBUTOR
    Posted Feb 26, 2020 07:35 AM
    @Jeff Roe, is the issue that they are picking an incorrect valid, SOP number or that they are entering a non-existent number and starting a new document?  If the latter, there is a setting under the SOP Type allow Override Document Numbers.

    ------------------------------
    Andrew Kennedy
    Principal Consultant
    Velosio
    Seven Hills OH
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: Disable/prevent manual entry in SOP Number field

    TOP CONTRIBUTOR
    Posted Feb 26, 2020 04:12 PM
    Unfortunately it is a number of different things that they enter into the sop number field, most by accident but the result tends to be forcing a cleanup, confusion etc.

    ------------------------------
    Jeff Roe
    Kele Inc
    Bartlett TN
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: Disable/prevent manual entry in SOP Number field

    TOP CONTRIBUTOR
    Posted Feb 26, 2020 04:14 PM
    David, thanks for your comments.  We do own the Power Tools product, any direction on how we would use the tools to customize the functionality desired?

    Thanks

    ------------------------------
    Jeff Roe
    Kele Inc
    Bartlett TN
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 7.  RE: Disable/prevent manual entry in SOP Number field

    GPUG ALL STAR
    Posted Feb 26, 2020 10:32 PM
    Edited by David Musgrave Feb 26, 2020 10:39 PM
      |   view attached
    @Jeff Roe

    You have GP Powe​r Tools installed and have the Developer Tools module registered. So we just need a quick trigger to make this work.

    I looked at the SOP_Entry (Sales Transaction Entry) window and decided that the best way to "lock" the SOP Number field without changing any functionality was to force the system to change focus to the Customer ID field once the SOP Number field is selected (and so populated). This will ensure that the next number functionality works as expected but also prevents manual changes to the automatically provided numbers.

    To make this work we just need a single trigger, but to make it easier to maintain, I created a Project to put the Trigger into.

    Project Setup


    Then I added a Focus Event Trigger to run after the Pre event on the SOP Number field.

    Trigger Setup Resource

    We did not need any changes to the Actions or Options tabs and just needed a single line of code added to the Script tab. The line is highlighted in the screenshot:

    focus 'Customer Number' of window SOP_Entry of form SOP_Entry;

    Trigger Setup Script


    This whole process took a couple of minutes to create. Writing this post to explain what I did took much longer.

    I have attached the configurations settings xml file which you can import into your system using the Configuration Export/Import window (for the first time) and the Project Setup window once the project exists.

    I will write this as a blog as I am trying to get more examples published.  Check out the GP Power Tools Samples page:

    https://winthropdc.wordpress.com/gp-power-tools-portal/gp-power-tools-samples/

    The possibilities of what you can do with GP Power Tools Developer Module are limited only by your imagination.

    Let me know if you have any questions.

    Regards

    David



    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 8.  RE: Disable/prevent manual entry in SOP Number field

    TOP CONTRIBUTOR
    Posted Feb 27, 2020 10:44 AM
    Fantastic, I'll give a try

    Thanks as always

    ------------------------------
    Jeff Roe
    Kele Inc
    Bartlett TN
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 9.  RE: Disable/prevent manual entry in SOP Number field

    TOP CONTRIBUTOR
    Posted Mar 03, 2020 04:07 PM
    David, just to let you know it worked perfect.

    Can only one trigger be used on a form?

    ------------------------------
    Jeff Roe
    Kele Inc
    Bartlett TN
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 10.  RE: Disable/prevent manual entry in SOP Number field

    GPUG ALL STAR
    Posted Mar 03, 2020 06:26 PM
    Hi Jeff

    No, you can have as many triggers as you want. Even multiple triggers on the same event.

    What you do is limited only by your imagination.

    Regards

    David

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role