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
SrBlancoSrBlanco 

{!Contact.AccountId} not available in s-control?

All,

I cant seem to reference Contact.AccountId as a merge field in a s-control.  When I do I get the errror:  "Field Contact.AccountId does not exist. Check spelling."

I also noticed that it isnt available from the merge field insert dropdown although I can definately see this field in Apex Explorer. 

I am basically trying to use it in a query like so:

Code:
qry += "AND Account__c = '{!Contact.AccountId}' AND Account__c <> null    ";

 


Any help is appreciated.
Greg HGreg H
As long as you are accessing the sControl from either the Account detail or Contact detail you should be able to use the merge field for the Account Id directly {!Account.Id}.
-greg
SrBlancoSrBlanco
Thanks Greg.

I feel like a bit if a dufas since your explanation made me realize there was a basic concept around merge fileds that had not snapped.  The light bulb is just went from dim to bright so I must go re-write some s-controls now...

Thanks again and enjoy the holidays!