0

My code is pretty straightforward and it works in my development Sandbox but not in the Testing Sandbox.

Here is my markup:

<apex:column headerValue="Account">
    <apex:outputLink target="_parent" value="{!URLFOR($Action.Account.View, c.accId) }">
                    {!c.AccountName}
    </apex:outputLink>
</apex:column>

Getting this error on Testing sandbox:

Content cannot be displayed: Invalid parameter for function URLFOR

Note: I have deployed my changes (code/new fields/layouts) today to testing org for my QA. Unfortunately I ended up here.

Why am I getting this error? How can I fix it?

  • 1
    Any chance c.accId is null? – Adrian Larson Mar 14 '18 at 21:09
  • Nope, I have got the value on my debugs. – Austin Evans Mar 14 '18 at 21:11
  • I am using a Wrapper class to display list of records here. So my debug statement pulls 100 records(based on my query) and displays them. – Austin Evans Mar 14 '18 at 21:16
  • 1
    Do you have read access to the Account object in the target org? Any features turned on like person accounts or multiple accounts per contact? Any action overrides? – Adrian Larson Mar 14 '18 at 21:17
  • Seems like to be: Multiple/Related accounts might be the issue. – Austin Evans Mar 14 '18 at 21:23
1

It seems like the most likely cause of this error is that you have a null value for c.accId. Double check and make sure that value is not nillable.

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.