0

I have two Objects: Prodotti_e_Servizi__c and Prodotto_contratto__c. In Prodotti_e_Servizi__c I have a field Prezzo_giornaliero__c instead in Prodotto_contratto__c I have a lookup relationship called Scelta__c to Prodotti_e_Servizi__c. The relationship name is Opportunit_contratti__r.

My question is: How can I show the field Prezzo_giornaliero__c of the related Prodotti_e_Servizi__c, inside a pageblocktable of List.

Now I'm trying something like : {!Prodotti_e_Servizi__c.Opportunit_contratti__r.Prezzo_giornaliero__c.sc.Scelta__c} but it's not working.

the pageblocktable is:

<apex:pageBlockTable value="{!shoppingCart}" var="sc" id="tabella">
                    <apex:column headerValue="ID ">
                    <apex:outputLink value="/{!sc.Id}" target="_blank">{!sc.Id}</apex:outputLink>
                    </apex:column>
                    <apex:column headerValue="Prodotto " value="{!sc.Scelta__c}"/>
                    <apex:column headerValue="Gioni di noleggio "> 
                    <apex:outputField value="{!sc.Giorni_durata_noleggio__c}">
                    <apex:inlineEditSupport event="ondblClick"/>
                    </apex:outputField>
                    </apex:column> 
                    <apex:column headerValue="Quantità ">
                    <apex:outputField value="{!sc.Quantit_prodotto__c}">
                    <apex:inlineEditSupport event="ondblClick"/>
                    </apex:outputField>
                    </apex:column> 
                    <apex:column headerValue="Sconto% " >
                    <apex:outputField value="{!sc.Sconto__c}">
                    <apex:inlineEditSupport event="ondblClick"/>
                    </apex:outputField>
                    </apex:column> 
                    <apex:column headerValue="Azioni">
                    <apex:commandButton action="{!deleteRow}" immediate="true" reRender="tabella" value="CANC">
                    <apex:param name="rowid" value="{!sc.Id}" assignTo="{!SelectedRowId}"/>
                    </apex:commandButton>
                    </apex:column>
                </apex:pageBlockTable>

where shoppingCart is the List of Prodotto_contratto__c.

0

Now the reference is working:

<apex:column headerValue="Prz noleggio(gg) " value="{!sc.Scelta__r.Prezzo_giornaliero__c }"/>

I find the correct relatioship name Scelta__r, but in the table Prezzo_giornaliero__c doesn't appear, why? I don't understand

1
  • Please check the field level security for field "Prezzo_giornaliero__c".
    – Devendra
    Jul 18 '16 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.