Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Visualforce Development
- :
- soql query issue error
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 03:05 AM
Hi, I am new to salesforce.
I creates a VF page to retrieve the data from custom object this page is design for customer portal user. There is a check box in object the condition is if check box is checked then record need to display if not record should not exist and also if potal user create the record in that case records should display by default even thought whether the check box is ticked are not
my soql query
public list<Support__c> objs = [select id,name,checkbox__c,question__c from Support__c where checkbox__c =: true or owner.Id = '00520000001wFyE' ];
for this IM getting error as
IssueUpdateClass Compile Error: Didn't understand relationship 'owner' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 7 column 42
Re: soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 03:39 AM
Change 'owner.id' to 'ownerid' - that is a field present on the record.
Certified Salesforce Technical Architect, Developer, Advanced Developer, Administrator, Advanced Administrator, Consultant, Sales Cloud Consultant,Service Cloud Consultant
Force.com MVP | The Bob Buzzard Blog | Linked In | Twitter
I don't respond to private messages/emails asking for help.
Take the Bob Buzzard Sobject Fields quiz.
Re: soql query issue error
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:00 AM - edited 11-14-2012 04:13 AM
i changed fro owner.id to ownerId
this is the error im getting now
No such column 'ownerId' on entity 'Customobject__c'. 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
Re: soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:04 AM
Is this a detail record in a master detail relationship?
Certified Salesforce Technical Architect, Developer, Advanced Developer, Administrator, Advanced Administrator, Consultant, Sales Cloud Consultant,Service Cloud Consultant
Force.com MVP | The Bob Buzzard Blog | Linked In | Twitter
I don't respond to private messages/emails asking for help.
Take the Bob Buzzard Sobject Fields quiz.
Re: soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:12 AM
yes,there is one look up field in this object with master detail relationship
Re: soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:18 AM
In that case the detail won't have an owner - you'll need to follow the relationship to the master and check the owner id of that.
Certified Salesforce Technical Architect, Developer, Advanced Developer, Administrator, Advanced Administrator, Consultant, Sales Cloud Consultant,Service Cloud Consultant
Force.com MVP | The Bob Buzzard Blog | Linked In | Twitter
I don't respond to private messages/emails asking for help.
Take the Bob Buzzard Sobject Fields quiz.
Re: soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:20 AM
how to do that to follow the relationship to master
Re: soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:42 AM
The relationship will be the name of the custom field that has the relationship, but with '__r' rather than '__c'.
E.g. if the relationship field is 'Parent__c', then you'd have:
Parent__r.OwnerId
Certified Salesforce Technical Architect, Developer, Advanced Developer, Administrator, Advanced Administrator, Consultant, Sales Cloud Consultant,Service Cloud Consultant
Force.com MVP | The Bob Buzzard Blog | Linked In | Twitter
I don't respond to private messages/emails asking for help.
Take the Bob Buzzard Sobject Fields quiz.
Re: soql query issue error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:58 AM
Yeah, but IM looking for user id
E.g.: I created a visualforce page in which object had a check box so if this check box =: 'true' than the records should display (working properly)
I need to put this page in customer portal, Here will be only one user to login to this portal to my knowledge. Here comes the trouble
if customer portal user insert the record then the record should display in visualforce page even though if the check box is checked or not
Re: soql query issue error
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 04:59 AM - edited 11-14-2012 04:59 AM
public list<Support__c> objs = [select id,name,checkbox__c,question__c from Support__c where checkbox__c =: true or ownerId = '00520000001wFyE' ];

