function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IdreesIdrees 

'Parent Account' field in Account count Tab not accepted in Custom page, any help please?

Hi
 
I have required to develop a salesforce custom page for account details insert, edit and view.
All things work successfully except "Parent Account"(Field Display Name) or "Parent" (Field Name),
It gives a compile time error as:
 
 
Error: ; nested exception is: common.exception.ApiQueryException: numberoflocations__c, ownership, parent, phone, prev_created_by__c ^ ERROR at Row:1:Column:237 No such column 'parent' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
 
Any feedback please.
Thanks for your time.
 
Muhammad Idrees,
Beyond Vision - software Developer
 
 
 
 
 
Abhay AroraAbhay Arora

Can you please share your code as  "Parent" field on account is correct seems like there is some other error

kamlesh_chauhankamlesh_chauhan

The field name of Parent Account is "ParentID".

 

If you want to display Parent Account name then write "Parent.Name" into query.

 

Sample Query.

 

Account A = [Select ID,ParentID,Parent.Name from Account Limit 1];

 

 

Hope this helps.

 

Regards,

Kamlesh Chauhan

LogicRain Technologies