fork download
  1. //Declaring an sObject variable of type Account
  2. Account objAccount = new Account();
  3.  
  4. //Assignment of values to fields of sObjects
  5. objAccount.Name = 'ABC Customer';
  6. objAccount.Description = 'Test Account';
  7. System.debug('objAccount variable value'+objAccount);
  8.  
  9. //Declaring an sObject for custom object APEX_Invoice_c
  10. APEX_Customer_c objCustomer = new APEX_Customer_c();
  11.  
  12. //Assigning value to fields
  13. objCustomer.APEX_Customer_Decscription_c = 'Test Customer';
  14. System.debug('value objCustomer'+objCustomer);
Success #stdin #stdout #stderr 0.01s 7864KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
./prog:1: expected expression