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
Reshmi SmijuReshmi Smiju 

Issue with VF in Trailhead

HI,
I am facing issue with the below  VF script. the error  Incorrect parameter type for function 'not()'. Expected Boolean, received Text

<apex:page sidebar="false" standardController="Account">
  <apex:form>
    <apex:pageBlock title="Account Detail">
        <apex:pageBlockSection columns="1">
            <apex:outputField value="{!Account.Name}"/>
            <apex:outputField value="{!Account.Phone}"/>
            <apex:outputField value="{!Account.Industry}"/>
            <apex:outputField value="{!Account.AnnualRevenue}"/>
        </apex:pageBlockSection>
   </apex:pageBlock>
    <apex:pageBlock title="Contact">
        <apex:pageBlockTable value="{!Account.contacts}" var="con">
            <apex:column>
                <apex:outputLink value="{!URLFOR(!$Action.Contact.Edit, contact.Id)}">
                    Edit
                </apex:outputLink>
                 &nbsp;
                <apex:outputLink value="{!URLFOR(!$Action.Contact.Delete, contact.Id)}">
                    Del
                </apex:outputLink>
            </apex:column>
            <apex:column value="{!con.Name}"/>
            <apex:column value="{!con.Title}"/>
            <apex:column value="{!con.Phone}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
  </apex:form>
</apex:page>

Pls let me know, where the code went wrong. Thanks
Best Answer chosen by Reshmi Smiju
Ajay K DubediAjay K Dubedi
Hello Reshmi,
There is a problem with your output link :
<apex:outputLink value="{!URLFOR($Action.Contact.Edit, con.id)}">
    Edit
</apex:outputLink>
 &nbsp;
<apex:outputLink value="{!URLFOR($Action.Contact.delete, con.id)}" onclick="return window.confirm('Are you sure?');">
    Del
</apex:outputLink>
Thanks.
 

All Answers

Ajay K DubediAjay K Dubedi
Hello Reshmi,
There is a problem with your output link :
<apex:outputLink value="{!URLFOR($Action.Contact.Edit, con.id)}">
    Edit
</apex:outputLink>
 &nbsp;
<apex:outputLink value="{!URLFOR($Action.Contact.delete, con.id)}" onclick="return window.confirm('Are you sure?');">
    Del
</apex:outputLink>
Thanks.
 
This was selected as the best answer
Reshmi SmijuReshmi Smiju
Thanks Ajay for quick response .:)
Ajay K DubediAjay K Dubedi
Hello Reshmi ,
If it really helped you then please select it the best answers it will help outher also.

 Thanks.
Ajay K Dubedi