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
fgwarb_1fgwarb_1 

Unexpected String Comparison result

 

VF Code

---{!subTypeIdToFormId[subType.Id] != subType.Id}---<br />
---{!subTypeIdToFormId[subType.Id]}---<br />
---{!subType.Id}---<br />

 VF Output

---true---
---a0qK0000001GhxGIAS---
---a0qK0000001GhxGIAS---

 

Variable definitions:

Apex:
public map<Id, Id> subTypeIdToFormId {get; set;}
public map<Id, Custom_Object__c[]> typeIdToSubTypes {get; set;}
public Id typeId {get; set;} 

VF:
<apex:repeat value="{!typeIdToSubTypes[typeId]}" var="subType" >

 

sfdcfoxsfdcfox

This is a Known Issue. The workaround is to use Strings instead of IDs when possible.

fgwarb_devfgwarb_dev

Glorious!  Thank you so much!!!!