You need to sign in to do that
Don't have an account?
darreln
Trigger to set task 'public' checkbox based on Contact record type
Hello all,
been doing some research, and understand that I cannot directly reference a contact or account record type from the task object. Here is my need:
I created a new record type for the contact object, let's call it ABC. Anytime a user creates a activity of type 'task' where the Parent object is a contact and the record type is ABC, I want to make sure the user clicks the "Public" checkbox on the task record when he/she saves the record.
I was thinking either show an error if it's not checked, or simply set the checkbox to TRUE when the record is saved, regardless of whether the user remembered or not.
From what I understand, this will require a trigger to be written. Looking for some help / sample trigger code that would get me there, as I am not a programmer :|
thank you!
been doing some research, and understand that I cannot directly reference a contact or account record type from the task object. Here is my need:
I created a new record type for the contact object, let's call it ABC. Anytime a user creates a activity of type 'task' where the Parent object is a contact and the record type is ABC, I want to make sure the user clicks the "Public" checkbox on the task record when he/she saves the record.
I was thinking either show an error if it's not checked, or simply set the checkbox to TRUE when the record is saved, regardless of whether the user remembered or not.
From what I understand, this will require a trigger to be written. Looking for some help / sample trigger code that would get me there, as I am not a programmer :|
thank you!
IsViseibleInSelfService is api name of public filed.
if you want to create custom public checkboc then use public__c inseted of IsVisibleInSelfService in this code
Use this code to show error message when contact is "ABC" type and public is not checked
I hope this is helpful for you
All Answers
IsViseibleInSelfService is api name of public filed.
if you want to create custom public checkboc then use public__c inseted of IsVisibleInSelfService in this code
Use this code to show error message when contact is "ABC" type and public is not checked
I hope this is helpful for you