+ Start a Discussion
Michael DsozaMichael Dsoza 

SOQL Query is not working for my website

SOQL Query required to get following result as....

 

select Investment_Asset__r.Fund__r.Scheme_Name__c, Investment_Asset__r.Description__c, Allocation__c, Allocated__c, GoalTracker_Action__c, Investment_Asset__r.entity__r.name from GoalInvestmentAssetAssociation__c

 

I want to print the value of Fund Scheme name which I referenced form Investment_Asset to Fund. & I wrote the query as mentioned above, In that Investment_Asset_r.Description__c is working but & Investment_Asset__r.anyField__c is working but when I insert one more reference in that like Investment_Asset__r.Fund__r.Scheme_Name__c then it do not execute then query.

 

Since Investment_Asset__r.Fund__r.Scheme_Name__c is working on Visualforce but when I use this in query for my website then it do not print any values.

 

I checked my wsdl jar file also but that field is also present there even though I am not getting any error in code but when execute the code then it do not execute that query ???

 

Please tell me why is it happening ????

Thanking you...

mikefitzmikefitz

Sounds like you may not have read access to related objects you are pulling from but rather just the root object.

Prafull G.Prafull G.

Can you please check the FLS of object for the site user ?

Michael DsozaMichael Dsoza

You mean to say, I can't use more than one lookup in query to get value.

Actually, I want to get value of that Scheme_Name__c field value.

 

like...

 

GoalInvestmentAssociation__c -> InvestmentAsset__c -> Fund__c -> Scheme_Name__c

 

Since here InvestmentAsset__c is reference in GoalInvestmentAssociation__c.

Similarly Fund__c is reference in InvestmentAsset__c.

& need value of Scheme_Name__c which is in Fund__c.

 

Is their any solution to get it like by using sub query ???? 

Michael DsozaMichael Dsoza

@crmtech21, Please can you tell me more that how to check the FLS of object for the site user  ????

Prafull G.Prafull G.

Go To

1. Setup -> Develop -> Sites

2. Click on the Site Label

3. Click on "Public Access Setting" button - You will redirected to your Guest User Profile.

On this profile you can change Field Level Securities(FLS) for the object you want.

 

Let me know if this helps.