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
CTU007CTU007 

after change API version from 16 to 18, some related list are missing on tabbed opportunity VF page

Hi, I just changed API version on my tabbed opportunity page to 18 to add "quotes", but somehow, 4 other tabs/related lists went missing:

 

Notes and Attachments

Approval History

Stage History

and a custom object  "Competitive Analysis"

 

No error occurred.

<apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNoteAtt" rendered="{!$Profile.Id='00e00000006ophl'||$Profile.Id='00e00000006oo19'}" > <apex:relatedList subject="{!opportunity}" list="NotesandAttachments" /> </apex:tab> <apex:tab label="Approval History" name="Approval History" id="tabapprovalhis" rendered="{!$Profile.Id='00e00000006ophl'||$Profile.Id='00e00000006oo19'}" > <apex:relatedList subject="{!opportunity}" list="ProcessSteps" /> </apex:tab> <apex:tab label="Stage History" name="Stage History" id="tabstagehistory" rendered="{!$Profile.Id='00e00000006ophl'||$Profile.Id='00e00000006oo19'}" > <apex:relatedList subject="{!opportunity}" list="OpportunityHistories" /> </apex:tab> <apex:tab label="Competitive Analysis" name="Competitive analysis" id="taboppcompana" rendered="{!$Profile.Id='00e00000006oijt'||$Profile.Id='00e00000006qngS'}" > <apex:relatedList subject="{!opportunity}" list="oppcompanalysis__r" /> </apex:tab>

 

 

 Users are complaining. I have to change API back to 16.

Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler

If you notice a change in behavior between versions it's always best to check the release notes.

 

Formula Expressions Always Return IDs with a Character Length of 18
    Previously, when resolving organization, user, or record IDs in formula expressions within aVisualforce page, the ID
    was a string of either 15 or 18 alphanumeric characters. Any Visualforce pages created against Salesforce.com API
    version 18.0 or higher will always resolve expressions that return IDs with a length of 18 characters.
 

All Answers

stephanstephan
In your rendered expression, have you tried checking against $Profile.Name, instead of Id? Is there a specific reason to hard code ids here?
CTU007CTU007

We have 4 admin users in my org, but I am the only one administrating. Other admins sometimes like to play with things, once they changed the name of a profile. That is the reason I used id instead of name.

 

Yes, I tried to change one id(admin) to its name and it is there now.

 

But why? I did not change any markup for the 4. and all other related list (open activities, contracts, etc) are rendered similarly by using profile id, and they are fine.

 

 

jwetzlerjwetzler

If you notice a change in behavior between versions it's always best to check the release notes.

 

Formula Expressions Always Return IDs with a Character Length of 18
    Previously, when resolving organization, user, or record IDs in formula expressions within aVisualforce page, the ID
    was a string of either 15 or 18 alphanumeric characters. Any Visualforce pages created against Salesforce.com API
    version 18.0 or higher will always resolve expressions that return IDs with a length of 18 characters.
 

This was selected as the best answer
CTU007CTU007

Thanks for the reply, Jill.

 

I think I will have to update all pages with IDs to names. 

jwetzlerjwetzler
That or you can use the BEGINS function, or just use the 18 char id.