Weblisting - Display Listing Agent

Getting the listing's owner information to your website is a little tricky as the "user" information is not directly accessible by the weblisting API. The information must be on the listing record to be shown on the website. This can be quite easily configured using cross-object-formulas (also explained in the article: Display Data between Objects).

1. You need to create the following fields on your listing object. The fields do not have to be visible to users, so you can keep them off the page layout, making them sometimes referred to as "hidden fields".

Go to Setup>Object Manager/Listing -> Fields & Relationships -> New

Type Field Label       Field Name (populates automatically) Formula
Formula (Text) Listing Agent First Name hidden Listing_Agent_First_Name_hidden Owner:User.FirstName
-> treat blank fields as blanks
Formula (Text) Listing Agent Last Name hidden Listing_Agent_Last_Name_hidden Owner:User.LastName 
-> treat blank fields as blanks
Formula (Text) Listing Agent Email hidden  Listing_Agent_Email_hidden Owner:User.Email
Formula (Text) Listing Agent Phone hidden Listing_Agent_Phone_hidden Owner:User.Phone

You can use the field lookup to find the formula result needed by finding "OwnerID" and then the corresponding field on the user object, so for a new "Listing agent first name" field:

2019-05-15_12-28-26.png

Add further contact formulas as required.

2. Adjust field level security of your new fields for your "sites" user as its described here under "Modifying Object Settings"

Once the permissions have been granted, you can access the new fields with you Weblisting query!

 

FAQ:

I followed the steps above, and my fields are showing, yet they don't have content?Please make sure not to create Duplicate Field Names! Check if the API name for the field you created perhaps already exists another time on the listing object. If that is the case, rename the API field name by adding e.g. _custom as explained in the linked article.

I would like to have a photo of my agent on the listing. Can I do this?
-> Yes. There is a Image URL field on the user object. Add a link to a picture of the user (e.g. somewhere on webserver publicly accessible). Then you can create a new field as mentioned in step 1 in this article and make sure to grant it access as linked in step 2.

Powered by Zendesk