• Mhawe
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I am trying to develop a flow where the user selects a state from a dropdown and then based on the state selection , he can access state-specific codes  from a master code table.  This functionality would be similar to the depedent picklists in the platform.  In particular, I am struggling with setting up the filters for the dynamic choice

 

Create a new choice for <Object Name> where 

State = "NY"

 

For example:

 

States

NY

CT

 

Master Code Table

(NY Codes)

123

124

125

 

(CT Codes)

126

127

 

 

Please advise.

 

  • March 09, 2012
  • Like
  • 0

I have written this trigger and it works great to store the first human generated activty date from the task to the lead record.

 

 

trigger ActivityFirstcontact on Task (after insert) {

List<Lead> updatedLeads= new List<Lead>();
 
    for(Task newTask:Trigger.new){
            if(string.valueOf(NewTask.WhoId).startsWith('00Q') && newTask.Subject != 'Lead Source Details')
            updatedLeads.add(new Lead(Id=newTask.WhoId, First_Contact_Date_Time__c=newTask.CreatedDate));
           }
    
              update updatedLeads;
              
   }

 

I am attempting to modify the code to only write to the field 

 

First_Contact_Date_Time__c

when the field is blank.  How can i update the code to manage this. Anytime I attempt to lookup the lead using the whoid i get errors.

 

Thoughts?