The CreatorCon Call for Content is officially open! Get started here.

Remove the Create New button from Incident Task if Incident is assigned to a specific group

Cupcake
Mega Guru

If someone can provide any assistance I would be most appreciative.

I have a customer who wants the "Create New" button removed from the Incident task if the Incident is assigned to a specific group.

If the Incident is not assigned to that group then the Create New button should be there.

Not sure if this needs to be accomplished via a Business Rule or Client Script.

So I see that I would need to update this in two places.

a) Directly remove the Create Inc task button from the Incident if the Incident is assigned to a specific group:

        find_real_file.png

b) Remove the New button directly on the Incident Task.

find_real_file.png

Thanks,

Karen

19 REPLIES 19

Karen,



Try passing the names instead of sys_ids and see if that works.


shloke04
Kilo Patron

Hi Karen,



This can be simply done by writing the script in List Control of the Related List as mentioned below:



1) For Example I have to Hide New Button on the Incident Task Related List when the Assignment Group is say "CAB Approval" on the Incident Form.


2) Right Click on the Header of the Related List and select Configure-->List Control as shown below:



find_real_file.png



3) In the Field "Omit New Condition" write a script as shown below:



find_real_file.png



In the Above Screen shot Replace the sys_id with the Sys_Id of the Assignment Group for whom you don't want to show the New Button.



Result:



find_real_file.png



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

This is most helpful and I learned a new way to accomplish something. So the ask is to omit this button for everyone except those in the CAB Approval assignment   group. So could I do



answer= (parent.assignment_group != ' sys_id of assigment grp' // This would be the sys_id of the assignment group that can use the new button.



Thanks,


Karen


Hi,



You just need to write it as below:



answer=(parent.assignment_group =='b85d44954a3623120004689b2d5dd60a');



Replace the sys Id above with your Group Sys ID for which you want to hide the Button. Please follow the above step as shown in the screen shot above in case you face any difficulty. You don't need to specify the Not Condition as you have mentioned in your script shared above.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Thanks Shloke I am sorry if I confused you.



Your script will not allowing anyone in that assignment group to not see the new button.



I want the reverse, I DO want the people in that assignment group to see the new button but everyone SHOULD NOT see it. That is why I asked if I could right the script like this: answer=(parent.assignment_group !='b85d44954a3623120004689b2d5dd60a');



Saying that the parent assignment group is NOT equal to that sys_id.



Thanks,


Karen