BY ANNE BROCK, RIGHTSTAR
We recently had a customer request to have different task layouts, based on whether a task was created from an Incident Record or a Change Record. While we did attempt to talk them out of it, this is possible with the Layout Type functionality introduced in Winter, 2018. Here’s a way to do it. The instructions are a bit abbreviated due to the number of areas we hit, but hopefully you can follow along.
Create two task layout types in Remedyforce Administration/Application Settings/Consoles. Make sure they are assigned to all the appropriate profiles. In my case, I decided to use the default layout for incidents, and created another layout for change:
You can see I have a field set called “Change Details” in the Task Change layout:
Create a couple tasks, using the new layouts. You need this to get the ID of the layout in the next step.
Use data loader to export your tasks. Now, you can just export all the fields and tasks, but if you want to get just the key fields and key records, use a qualification like this:
Select Name, BMCServiceDesk__RF_FKLayout__c FROM BMCServiceDesk__Task__c WHERE BMCServiceDesk__RF_FKLayout__c != ”
You can build that in data loader, but it’s not much fun finding the FKLayout field, so you may just want to copy and paste it.
That’s going to give you a file with two columns; column one is the number of the Task ID and column 2 is the ID of the Layout page. You just need to figure out which task was created from an incident, and which was created from a change; then you will have the correct ID for each layout type. In my case, task 1212 was created from a Change; so I know the ID ending in LAAQ is my Task Change layout; and the one ending in 33AAC is my Default task layout.
You can now create either a workflow rule OR a process builder flow to set the Layout Type whenever a task is created from an incident or a change. I tried both; let’s look at the workflow rule first. (Of course, if you do both, you only want one to be active at a time.)
I first created a template, where I set the Layout Type to the Task Change type, and then did this workflow rule:
That’s pretty simple; but we know we want to use Process Builder more, so let’s look at that process. This isn’t the easiest to see in screen prints, but let’s walk through it. My first Criteria was Is it from a change? I check this by looking at the BMCServiceDesk__FK_Change__c field, and seeing if it’s blank (global constant Null).
If it is, I set the Layout Type field to the ID that I got through my export.
I then check to see if it’s from an Incident record, and then set the Layout Type field to that ID from the exported file.
Of course, if it’s coming from neither of them – I created it manually as a standalone task – the layout won’t be set by the workflow; it will then go to the default layout and I can choose a different layout if I want.
To test, go to an Incident (or a Change); go to the Details; and create a task linked to the Incident (or the Change). It should come up with the preferred Layout Type.
I’m sure a lot of you are thinking of different ways to use this – maybe based on the Category of the task, it gets a different default layout, or some other combination of factors – but Winter, 18 makes this possible.
Warning: If you are creating tasks through Service Request Management, you may want to choose the template there rather than letting this workflow drive it, so just bear that in mind – you may need some other kind of flag so this workflow doesn’t fire if it’s from self-service.
We hope this was useful!
Different Task Layouts for Tasks Created from a Change vs an Incident
BY ANNE BROCK, RIGHTSTAR