Hi all, I have a Client Script that's changing and validating Sublist Values as the user enters line items.
However, my end users are getting very different results than to what I get when testing as an Admin. Client Scripts don't have permissions to run things as Admin, do they? I don't know what to think would be causing my users to have different results...
The issue:
When a user changes the price level, either from Custom (Which allows the user to enter a custom rate) or to Multi Rate or Catalogue Rate (which are fixed prices based on the qty of the item ordered), when submitting the line, the rate always returns to the original value and not what the user changed it to, the price level however would stick.
EG - Item loads with Custom Rate of 1.00
User changes it to Multi Rate which is fixed at 1.50
User submits the line, it submits as Multi Rate at 1.00
Same vise versa, the rate always reverts to whatever the line item loads at.
None of this happens for me when testing as an admin. My rates all work fine and as does the discount functionality that I've added.
There are other scripts put in place by the implementation team that work on similar columns, but I would think again since they're also working on all roles, that wouldn't affect my results compared to other roles. Perhaps the order that the scripts run in? But that shouldn't be different per role either.
The validate line function that I'm working on: Implementing this code is what causes the error.
Users are also not using the discount rate functionality which is what this codes main purpose is. So I assume the error is being caused by another script, but none of the other Client Scripts on the estimate record target or set the rate of the item either. Again, my main question is why this could behave differently between a user role and an admin role. All I'm doing is changing the deployment from being Admins to All Users
The fields in question.