Map as Lookup Field

Enabling the Feature

The feature is enabled through the use of a Custom Button that simply passes additional parameters across in the URL.  The URL in the video example is:

/apex/geopointe__Map?

 

Id={!Account.Id}

 

&wbRecordId={!Account.Id}

 

&wbField=Related_Account__c

 

&wbLookupObject=Account

 

&wbButtonText={!URLENCODE("Relate This Account to " & Account.Name)}

 

Let’s break it down

 

/apex/geopointe__Map?

 

Id={!Account.Id}

The above is the URL from the button included with the application. It is required to sent the user to the proper page in the proper context.

&wbRecordId={!Account.Id}

wbRecordId is the ID of the record we will be writing back to.

&wbField=Related_Account__c

wbField is the field on that record we will be populating.

&wbLookupObject=Account

wbLookupObject is the object type that we will be searching for and populating the lookup field for.

&wbButtonText={!URLENCODE("Relate This Account to " & Account.Name)}

wbButtonText is optional, but can be included if you want to customize the button’s text. It is recommended to use the URLENCODE function when specifying your text, especially if you are merging in data from the system.

Related Posts