• Gaurav Gulanjkar 18
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
I'm new to Apex and creating Triggers so hoping someone can help. Here's the scenario;
 
I have created same fields for both contact object and opportunity object. I would like to automatically update the field values on opportunity object whenever I cretae new customer record.
For this I have written the trigger with the event after insert. But I am getting error
Can anyone correct the below code plz….
trigger updateField on Contact (after insert) {
 Set<Id> Ids= new Set<Id>();
    for (Contact contact : Trigger.new)
    {
    Ids.add(customer.Id);  
    }
  List<Contact> contactList = new List<Contact>([Select Id,First_name__c, Last_name_c  FromContact where Id in :Ids]);   
       for(Contact temp : contactList )
       {
       Oppertunities oppor = new  Oppertunities();
       oppor.First_Name__c = temp. First_name__c,;
       oppor.Last_Name_c  = Last_name_c;
       insert oppor;
       }
    
Hi All,
By using soql we can retrieve the records 50,000, Now i have 60,000 records how to i can achive this.

Viswam.
I have found lots of error when practicing on this trainhead. It seems trialhead is not working if namespace are enabled.

There was an unhandled exception. Please reference ID: KDXDFLAT. Error: Faraday::ClientError. Message: INVALID_TYPE: select id from battle_station__c where name = 'TH ^ ERROR at Row:1:Column:16 sObject type 'battle_station__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.
I have a scenario where I am displaying knowledge base articles in communities. I have a requirement where I need to show a download button and upload button. How can I go with this approach to achive above.