• Happy2Help
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi,

 

I'm trying to select a address from the database and displaying them in the Visual Force page by using a add button.

 

Say if I add

 

1870 Fair Oaks West Sunnyvale 94086 CA address to my list, I can again add the same address to my list which is causing duplicate records, how do I prevent this duplicate record from being added again ?

 

Hi ,

 

I have a custom field on my Contact, which tracks of any open tasks.The field is called " Tasks_Pending__c". Its a Picklist with two values "yes" or "No".

Assume that i have  2 tasks associated a contact.

 

Task 1 has a status as "Completed" and Task 2 has a Status as "Not started".

 

then Tasks_Pending__c should have a Value "Yes", if both task status is equal to "completed", it should be "No".

 

I have written a trigger, but could not accomplish as i got stuch.Can any one help me with this.

 

trigger Check_Tasks on Contact (after Insert, after Update) 
{
    List<Id> Contact_Ids= new List<Id>();
    
    for(Contact c: Trigger.New)
    {
        Contact_Ids.add(c.Id);
    }
    
    List<Task> getcontact_Tasks=[Select Id,Status,WhoId from Task where WhoId IN :Contact_Ids and Status='Not Started'];
  
      List<Contact> ct=new List<contact>();  
    if(getcontact_Tasks.Size()>0)
    {
    
    }

 

Thanks,

Sales4ce

Hi All

 

I would like to know where is the Error log stored in Salesforce. I have written Apex code which catch and throw exceptions.

I want to know where the exceptions log is maintained in SFDC.

Hi,

 

Is there a way to detect in Apex if the system is a Sandbox or a Dev Edition?

 

Thanks.