• Amit Awasthi 7
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
(New org, Superbadge: App Customization Specialist, Step 4)
Cant figure out why Volunteer Jobs isnt showing up. Double checked the relationships and all and couldnt find anything wrong. Would appreciate any help on the matter.
User-added imageUser-added image
  • February 28, 2019
  • Like
  • 1
Error:-
|System.QueryException: unexpected token: 'null'


i am getting this error in myclass when i not selected any field
i need to this is dynamically hoe can i do that 

my query like:-

select ID,P_Edition__c,p_Opprotuny_name__c,P_Opportunity_ID__c,P_Stage__c,P_Banner__c,null from opportunitylineitem where P_Edition__c = 'Adipec 2018'

how can avoid that if any time i skeep that field and run the class did not get this error please help me
My scnario was when iam inserting account record automatically associated contact also should  insert:
But iam getting error like ;Variable does not exist: name' but i have field Name on account
trigger account_trigger on Account (after insert,after update)
{
  if(Trigger.isInsert)
  {

    List<Contact> ct = new List <Contact>();

    for(Account acc : trigger.new)
    {

        Contact c = new Contact(LastName=acc.name,AccountId=acc.id,MailingStreet=acc.BillingStree,
                    Phone=acc.Phone);

        ct.add(c);
    }
    insert ct;
  }
}