function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NWhite123NWhite123 

Trigger a task field update when a case is created

Hi

 

I want to be able to automatically update the "visible in Self Service" standard task field everytime a case is created so that all tasks are always visible on the self service portal.

Someone suggested that i look at codes and triggers but i am a little unsure - would someone be able to point me in the right direction.

 

Many Thanks

 

Natalie

brielea1984brielea1984

Hi there, 

 

You can create a workflow with a field update. Go to setup --> Create --> Workflows&Approvals-->Workflow Rule. Create a new workflow rule. First you will selec the object the workflow will apply to, in this case the object is "Case". The next step is defining the criteria. If you only want this field to be updated upon creation, choose "only when a new record is created." but you also have the option to have it apply to editing or meeting rule criteria. You do have to create rule criteria, such as Case Status Equal New or Open would be my suggestion.

 

Next you will add the workflow action, which will be a field update. Select the field you want to update, "visible in the self-service portal", and it will give you the option to select the checkbox you wish it to populate, in this case it will be "true" Then you will hit done and you've created the workflow! You're last step will be to activate the workflow which you can do from your list of workflow rules or from a button on the specific workflow rule page.

 

Hope that helps!

NWhite123NWhite123

Hi,

 

I have tried that and it does not work and i think that it is because i have used workflow to create the tasks automatically when the case is created and it is the "visible in self service" on the tasks that i want to automate so it is like doing workflow on 2 objects not one as the option gives you.

 

Any suggestions?

Many Thanks

brielea1984brielea1984

I see, I think I misread your first post. I tried playing around with workflows to see if I could come up with a solution. The issue with workflows is that you can only have workflows that affect multiple objects when there is a master-detail relationship, atleast that's what it looks like to me. And unfortunately you can't create a master-detail relationship with tasks and cases. I'm also somewhat of a novice so someone might have a better piece of advice. My guess is that this would be a case where you need to create an apex trigger. I am not familiar enough with the language of triggers to be able to write one, so hopefully someone else here can give better advice. Sorry I couldn't help! Good luck!