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
YaronYaron 

Need to create a S-control that will change the field value depending on a task

Hi,
 
I need help, or a syntex, i want to create a S-control that will change the status of a lead, depending
 
on a task, for example if i create a log a call task then the lead status sould be changed to connected.
 
 
Thanks,
 
 
PBS_IC786PBS_IC786
Download the latest version of AJAX tools (its free) and study the section on CRUD...that is the best way to learn data manipulation through s-controls...

HTHs
MKPartners.comMKPartners.com
This is very common to other s-controls we have built for our clients.
 
A simple solutions is to build an inline s-control on your lead that queries related tasks for one where a subject = "Call" and if found updates the lead status.  I recommend you add an if statement at the beginning to make sure that the s-control only runs when that status has not already been updated, this will also allow you to optionally refresh the page upon update.
 
The main issue with this type of s-control is that it runs every time you view the lead rather than when you actually create the task.  A more precise but complex solution would be to create an s-control that displays a custom new task form that when saved both creates the task and updates the lead.
YaronYaron
Ok,
 
thanks for you comment,
 
I tought about : when saving the task update the related lead,
 
Do i need to use a code? or a formula in the s-control?
 
Thanks.