readonly protect rule only after value changed to 'XYZ'

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

readonly protect rule only after value changed to 'XYZ'

Post by swiftinitpvtltd »

I want to make a certain BO record readonly from all except system when record changed to 'XYZ'.
When I add Protect mybo from all except system in update event and when user changes item value to XYZ it immediately throws error as access denied. I tried doing it in process call inside update but it says protect call is outside context. I only want to protect a record when its one column value changes to 'XYZ'
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: readonly protect rule only after value changed to 'XYZ'

Post by BobK »

Change your rule to something like the following

Code: Select all

If mybo.item = 'XYZ' AND NOT(mybo.item WAS CHANGED TO 'XYZ') Then PROTECT mybo
Bob
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: readonly protect rule only after value changed to 'XYZ'

Post by swiftinitpvtltd »

Thank you! It work using
If mybo.item = 'XYZ' AND NOT(mybo.item WAS CHANGED TO 'XYZ') Then PROTECT mybo
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: readonly protect rule only after value changed to 'XYZ'

Post by swiftinitpvtltd »

One issue I have is I have grids with inline editing and I need confirmation message before making that record readonly. Now the confirmation message only works in process(does not work in item update rule). So I can use jquery kendo grid but is there any way I can have confirmation display question on change of the dropdown(to XYZ value) in query grid which also has inline editing enabled. If user confirms yes value in grid item changes to XYZ and item becomes readonly.
Post Reply