• mohsin ahmad 11
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
when we create a page, we make standard controller if we have to work on standard object like "Account". I want to know, do we need to make custom controller when working on custom object or simply we have to use customobject__c by using standard controller.
For eg: If I have a custom object Emplyee, then I have to make a custom controller with Employee__c or simply write standardcontroller="Employee__c".

When I tried to insert a record through the apex coding, I found an error :

"Line: 1, Column: 16
Invalid constructor syntax, name=value pairs can only be used for SObjects "


The code that I used was:

Account acct = new Account(
    Name='SFDC Computing',
    Phone='(415)555-1212',
    NumberOfEmployees=50,
    BillingCity='San Francisco');
insert acct;

Please tell me , why this type of error am facing??

Regards,
Mohsin Ahmad

when we create a page, we make standard controller if we have to work on standard object like "Account". I want to know, do we need to make custom controller when working on custom object or simply we have to use customobject__c by using standard controller.
For eg: If I have a custom object Emplyee, then I have to make a custom controller with Employee__c or simply write standardcontroller="Employee__c".
I am trying to complete Trail Head modules, but the site will not let me do so and keeps routing me to sign in using a developer account. When I try to create a developer account at the bottom of the page when it asks me to create a username, no matter what email I use (my company email address- IbeA@incapsulate.com or my personal email address- Annegelica.Ibe@gmail.com), it states that an account with this email is already in use.  Can anyone help me? I tried opening a case with Salesforce but they told me to just post my question/issue on this forum. 

When I tried to insert a record through the apex coding, I found an error :

"Line: 1, Column: 16
Invalid constructor syntax, name=value pairs can only be used for SObjects "


The code that I used was:

Account acct = new Account(
    Name='SFDC Computing',
    Phone='(415)555-1212',
    NumberOfEmployees=50,
    BillingCity='San Francisco');
insert acct;

Please tell me , why this type of error am facing??

Regards,
Mohsin Ahmad