Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to limit field access throuhg workflow
#11
Well not, entirely. Let me explain:

I've setup my validation to check the database, to see if a certain sostatus is set at this time. Let's say it's "A". The current user wants to change to status "B", but is not allowed to change to ANYTHING other than "A", because that is the current status in the database. So the users dismisses the alert and the visible selection in the dropdown is returned to "A". But in the javascript memory, the selected value is still "B" (the value the user tried to change the status to).

The user accepts his defeat and in stead, he wants to change the shipping address. The same validation alert now appears, saying that the user is not allowed to change the status to anything other than "A", but as far as he/she can see, the value IS set to "A". So the validation script checks against a different value than the user sees at that point...
Reply
#12
I have to admit that the part where you say "and the visible selection in the dropdown is returned to "A"." surprises me. As far as I know there is no code to set that value back and I'd say it will stay put on "B".
If this does happen it will only be on a picklist.... In any case I'll try to find some time to test it and get back to you.
Joe
TSolucio
Reply
#13
This could also be browser behaviour that didn't exist at the time this functionality was created.. BTW I'm testing on Chrome.
Reply
#14
Well, I investigated this and much to my surprise (twice in the last two days!!) this functionality is actually implemented and in place from vtiger CRM. Truth is that it is an incredible application we started from, and it just keeps on getting better!

The problem was only with the picklist. Every time you selected a value in the picklist it updated the previous value that had been saved, so it effectively overwrote the original value. I have fixed this with this patch:

https://github.com/tsolucio/corebos/comm...950f3764ff

give it a try and let me know how it goes.
Joe
TSolucio
Reply
#15
Thanks! Will test and let you know.

Seems to be working, great! Yes, I'm discovering a lot of clever functionality was already in place, good stuff..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)