• Tristam Tredgett 3
  • 0 Points
  • Member since 2018

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
I am using a VisualForce page that searches for an object within a different web-based system and displays it on the record page in SF.  In my case, it is pulling the object ID in SF and passing that to the other site and searching for a record that matches this ID.  The problem I have is that in my other system I am using the 15 digit IDs but the VF page is using the 18 digit ID so it is not finding what I am looking for.  Here is my markup I am using:

<apex:page standardController="Account" title="Workspace corresponding to an account">
  <apex:iframe scrolling="true" title="Account Workspace" src="<WEBSITE URL?sfSession={!$Api.Session_ID}&sfUrl={!$Api.Partner_Server_URL_70}&smallDisplay=Y&ws={!URLENCODE(account.id)}"/>

When I look in the URL of the object page I see this ID:


But my VF page is passing this ID:


I know about the CASESAFEID formula operator that will convert the 15 digit ID to the 18 digit but I am sort of looking for the opposite.  Or if there is a way that I could truncate the ID down to 15 or something that also might work.  I realize that it would be better to use the 18 digit IDs in my other system but I already have a lot of data there and it would be a ton of work to go and change it at this point.  Any Ideas?  I am not real savvy on this stuff yet so go easy on me :)