Giving the Request Area on a new Request opened by an Employee a default value that cannot be edited.

Document ID : KB000051366
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

I would like my Employees to open requests in Service Desk and have the request area set to a default value that the employee cannot edit.

Solution:

Run the following command from a command prompt on the server:
bop_odump domsrvr pcat "" sym

This will give a list that looks like this:

Persid           sym
   
pcat:400051      NewArea
pcat:400102      User Access.YesMail Add/Modify
pcat:5100        Software
pcat:5101        Hardware
pcat:5102        Networks
pcat:5103        Applications
pcat:5104        Software.Environment
pcat:5105        Software.Environment.DOS
pcat:5106        Software.Environment.OS2
pcat:5107        Software.Environment.Windows
pcat:5108        Printer
pcat:5109        Email

Take note of the persid belonging to the sym that you want to use as the default request area for Employees.

Log into Service Desk as an Administrator and click on the Administration tab.
Click on Security and Role Management>Data Partitions>Data Partition List

Select the Employee data partition.
Check to see if in the Contraints List there is already a Call_Req table with a Type of Defaults . If so, we will edit it. If not we will add a new constraint.

If adding a new constraint, click the New Constraint button and select Table Name: Call_Req and Constraint Type Default

If editing an existing constraint, click on the constraint name and click the Edit button.

On the Constraint field, we will need to add the following text:
category='pcat:5109'

where pcat:5109 corresponds to the data you located above when running the bop_odump command. In this example, pcat:5109 corresponds to the Request Area Email

(if you are adding to an existing default constraint you will need to separate constraints with an AND)

Save and close the Data Partition windows.

As an extra step, you might confirm that any Employee users have the Employee data partition set up on their contact record. This can be done under the Security and Role Management folder under Contacts. The Employee Role should already have this data partition associated with it.

You can now test this much by opening a new Request as an Employee to make sure the default is set to your desired Request Area.

Now, to make the field un-editable by Employees we need to go into Web Screen Painter.

Select File>Open and specify Employee for the Interface or File Type field.
Find the form detail_cr.htmpl and click open.

On the second line of this form, there is a Request Area field with Category written under it. If you click once on that field you will notice the black boxes that surround it. Now right click and select Copy.

Go down to the fifth line and you will see another couple of Request Areas. On the first one that follows the If, click on it once so that the black boxes surround it. Then right click and select paste. This will insert the copied Request Area before the one we wanted to replace. So now select the second one again (which will have a plus sign in front of the words Request Area) right click and select delete.

Now select File>Save and then File>Publish

You can run pdm_webcache from a command line to clear out all cached htmpl forms so that the new ones will be used.

Now when you login to Service Desk as an employee and open a new request, you should see the Request Area that is defaulting to your selected Request Area and is not editable.