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
Sarim AlaviSarim Alavi 

Error: Expression of type Text cannot be subscripted.

hi whenever i am using field set in my visualforce page i am getting ErrorError: Expression of type Text cannot be subscripted.

this is the code

 

 

 

<apex:repeat value="{!$ObjectType.Hotel_Reservation__c.FieldSets.ReservationCheck}" var="f">
                <apex:outputField value="{!selectedContact[f]}"/>
            </apex:repeat>

aballardaballard

Sounds like selectedContact is not correct -- a string instead of a Hotel_Reserveration__c which is what it would need to be for this to be valid.