Does anyone have a USD to bypass the Module Option for specific user role?

I am looking for a USD to fire up and ignore the user role for a specific user whose role does not "Allow Price override in S/O Data Entry" (module option" tab of Role Maintenance)  and actually enables the user to change the unit price. 

  • 0
    Seems to me that it would be quicker and more reliable to just create a role with that permission, then assign the new role to that user.
  • 0 in reply to Kevin M
    There are other business rules that does not make your suggestion possible. Other USDs are being fired up the automatically changes the unit price based on the specific business rules.
  • 0 in reply to keyhant
    OK, if you're trying to override a script with another script that's different. Perhaps add a UDF for the new price, then have your script check if the UDF is non-zero, then swap that in as the unit price.
  • 0 in reply to Kevin M
    Thanks for trying to answer this. I really need a script that would suppress the Module Option in Role Maintenance? Here is the script that fires up every time a qty is entered in Sales Order lines: (For specific Warehouse in the case MIC,if there are any values in CI Item UDF "UDF_ADL_AMT), original unit price is replace with a new unit price which includes the additional amount. Since the specific user belongs to the role that the Module Option enforces the nor allow rule "Allow Price override in S/O Data Entry" hence the user receives the message box "You are not authorize to modify the price. Do you want to override?" At this point, when he responds no the unit price is changed back to original and this is not what we want.) I simply need a uds that suppresses the Module Option and allow this script to complete without changing the user's Role Maintenance in Module Option. Does this make sense now?

    retVal = 0
    AddAmt=0
    NewUnitPrice = 0
    OldUnitPrice = 0
    Warehouse=""

    retVal = oBusObj.GetValue("UDF_ADL_AMT", AddAmt)
    retVal = oBusObj.GetValue("WarehouseCode$",Warehouse)

    if Warehouse ="MIC" then

    retVal = oBusObj.GetValue("UnitPrice", OldUnitPrice)

    NewUnitPrice = OldUnitPrice + AddAmt

    retVal = oBusObj.SetValue("UnitPrice", NewUnitPrice)

    MsgBox ("Note: An addtional amount of $ " &AddAmt &" will be added to 'the unit price!")

    End if
  • 0 in reply to keyhant
    It makes sense, but I'm not sure what you ask for is possible. Business Objects apply role permissions automatically.

    If you're on v2015 you might be able to use the new UI scripting to hide / disable the Unit Price column within the data entry grid, allowing you to enable the permission without the risk of manual changes.
  • 0 in reply to Kevin M
    Oka. Thanks for your suggestion. This may actually work. I will give it a try and let you know. Thank you for your brilliant idea.