BPM to Disable CheckBoxes in Order Job Wizard

I’m trying to develop a BPM that disables (or hides) two check boxes on the Order Job Wizard form if a user is not part of a certain group. I’m using the SelectAll method of OrderJobWiz, because I wasn’t sure what else to use. I have a condition that checks if the user belongs to the Planning group and have a message that says if they do or don’t (which fires on each check - again, wasn’t sure which method to use). Now I need to come up with some custom code that will disable (or hide) the “Schedule All” and “Release All” check boxes, but I can’t find anything that will target those controls. I’ve been able to manipulate controls on normal form, but the Order Job Wizard seems to be a little different. Does anyone know of a way to accomplish this? Any help will be appreciated. Thank you for your time!

You can’t use a BPM to hide controls on the UI. For that you need a customization.

1 Like

Thanks for the reply! Unfortunately, customization won’t work for this because we only need 2 check boxes enabled/disabled based on a users group. So basically I can’t even disable/enable a control using a BPM?

You can get the users’ group from a customization it is nearly impossible to change the behavior of controls from a BPM

1 Like

I think the only possible thing you could do is throw an exception when they try to use it when in/not in a group after the fact.

Probably the cleanest way would be through customization though.

1 Like

You customize the form (Load event on the form), use the UserFile BO to check which group(s) the logged in user is a member of, if they aren’t in a specific group(s) then disable/enable controls.

1 Like

@ShawnLeenerts : Greetings…

Its very simple n will get 5 mins of your time, You have to just create a BPM on OrderJobWiz.selectAll or OrderJobWiz.createJob. (I have written it on create job instead selectAll in hurry…lolzz…but it works fine in both cases…don’t worry)

STEP-1- select OrderJobWiz Business object, select your method.
STEP-2- Create new preprocessing. Give name,Group. Tick on Checkbox of company independent,and prevent endless loops.
STEP-3- In condition area, select new condition as ‘the user call method belongs to specific group’.

STEP-4- in this condition, select user group ,that you want to prevent from modify the screen.

STEP-5- Save it, n go to Action area. Select ‘Raise exception on designed template.’
This template is your Error message to user.

STEP-6- Save it . enable BPM, now its time to verify.

Go to your Order Job Wizard screen,Login with any test user,whoes group belongs to user group, which you want to prevent.

Tick on ‘Select All’, If you have written it on ‘SelectAll’ Method, an exception will raise here or if the method is ‘Createjob’ it will raise when you click on ‘CreateJob’ Button.

Hope it will work perfect…

2 Likes

Prakash_Bankar,

Thanks for the reply! Unfortunately, this triggers all check boxes, and I only need the last two (Schedule & Release) to have the exception.

I did try adding another condition to look if either had been checked, but that didn’t work either.

Thanks again for your time!

Actually schedulALL and ReleaseAll chekboxes are binds with JWControl, not JWJobOrderDtl.…I tried hard to find these controls to make BPM succeed, but got failed. Let’s see.

1 Like

Why don’t you just disable them with Field Level security - this won’t hide them on the form but will stop unauthorised users from changing the value?
Sue

1 Like

Thanks Sue! Not sure, however, if the Schedule All and Release All check boxes actually alter any table fields.

Shawn