Sage 100

 View Only
  • 1.  Script to set pricing without allowing "price override" security option

    Posted 09-14-2023 09:48

    I have a client that wanted a script to add a misc charge code as a line item when particular items are added. Easy enough & it works. However, when we calculate & set the price of that added item, it becomes a price override since it changes each time. While testing, our user had all security permissions, so when they tested with another user, they started getting the "You are not authorized to modify the price" message.

    Can I script around this? Can I bypass this security check somehow so they don't have to turn this feature on which allows users to change the price on all items. 

    #script #scripting 



    ------------------------------
    Dana Young
    Lehman Wesley & Associates
    ------------------------------


  • 2.  RE: Script to set pricing without allowing "price override" security option

    Posted 09-14-2023 10:01

    You will probably need to grant the price override to all roles and script your own solution to check for whether the user has a "price override" role. This script is added to the pre-validation of Unit Price column, set error if user doesn't have the "price override" role. The "price override" role doesn't have to have anything in it. It is just a role that can be assigned to users who CAN override pricing. The script should check for a specific item code (your misc charge code) that skips the test. 



    ------------------------------
    Eric Lunceford
    First Mate Business Solutions
    Oklahoma City, OK
    877-880-8960
    ------------------------------



  • 3.  RE: Script to set pricing without allowing "price override" security option

    Posted 09-14-2023 12:45

    Be careful with this kind of script and be sure to test.  I believe Sage's automatically calculated unit price (based on pricing hierarchy) does trigger that event.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 4.  RE: Script to set pricing without allowing "price override" security option

    Posted 09-14-2023 15:25

    Thank you @Eric Lunceford, this worked. I was able to call out the misc item that is allowed to be set & also incorporated edit state logic to only allow it to be set once & then not modified after that. Testing went well but we are continuing to test before going live. I appreciate the guidance! 



    ------------------------------
    Dana Young
    Lehman Wesley & Associates
    ------------------------------