Skip to main content
30 votes

Get Site URL from apex

Since Winter '17 (v38.0) You can get the secureURL using the SiteDetail object Site mySite = [select Id from Site where Name = 'MySite']; SiteDetail mySiteDetail = [select SecureURL from SiteDetail ...
benahm's user avatar
  • 2,627
26 votes
Accepted

Debug logs not working for Site Guest Users (Force.com sites) after the Winter 17 release

The answer we received from Salesforce Tech support is that before the Winter 17 release, if you turned on debugging for a Site Guest User, you might receive an avalanche of debug logs if many ...
Jph108's user avatar
  • 651
13 votes

How can I get a debug log for the sites guest user/public profile? [updated for Spring 18]

Adding to Shane's answer- The release notes which were linked to above include specific instructions for setting the cookie in Chrome, but not in Firefox. Here's one way of doing it in Firefox: ...
Martha Seneta's user avatar
12 votes

How can I get a debug log for the sites guest user/public profile? [updated for Spring 18]

Chrome & Edge The above answers are not so clear instructions for winter 17 release .For winter 17 release open the public site first by clicking on the links in the Develop | Sites | Site And ...
Mohith Shrivastava's user avatar
10 votes

Expose Lightning .app publicly?

@everyone as part of spring 17 Lightning components can be added to unauthenticated sites using lightning out. below is the link https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/...
RedDevil's user avatar
  • 7,841
8 votes
Accepted

Salesforce Error Publishing Community 1715759908

Salesforce Support got back to me and they said that this was most likely caused because during the deployment, Navigation Menu Item records were created without having a DraftRowId set. As a solution:...
Z33dawg's user avatar
  • 1,421
7 votes
Accepted

Sites' Guest Access to the Support API?

https://releasenotes.docs.salesforce.com/en-us/summer16/release-notes/rn_networks_guest_log_case.htm To ensure your guest community users can securely log cases directly through contact support, ...
Eric's user avatar
  • 54.2k
7 votes
Accepted

System.VisualforceException: Update access denied for Contact, controller action methods may not execute

In public access setting of a Force.com site the maximum permissions that you can specify for Contact object are Read and Create. (Edit and Delete are not allowed). Your page is directly providing ...
Mukesh Verma's user avatar
  • 1,916
7 votes
Accepted

What is the difference between My domain and sites domain?

MyDomain is a custom URL to directly log-in to your Salesforce Instance rather than going through https//login.Salesforce.com. You can go through either one to reach your instance, but it allows for ...
crmprogdev's user avatar
6 votes

How can I get a debug log for the sites guest user/public profile? [updated for Spring 18]

Update This is no longer needed as of Spring '18 In Winter ’17, we introduced a change that required guest users to set browser cookies to activate debug logging. We had the best of intentions:...
Ralph Callaway's user avatar
6 votes
Accepted

Rendered Tags not Working on Sequential Visualforce Pages (Force.com Site)

I've played around with your code a bit then I remembered you wrote "Refreshing the page will update the rendering to be correct, however the refreshing is manual." It happens because of caching ...
tugce's user avatar
  • 2,737
6 votes
Accepted

Not able to display Lightning component in Sites

You will need to enable Salesforce communities to get it working .The docs clearly mentions that for lightning out to work for guest users you need Salesforce communities enabled . Also any error ...
Mohith Shrivastava's user avatar
6 votes
Accepted

how can users access my page without logging in

You need to make sure that the visualforce page which you created has access to Guest user profile. To navigate to Guest user, do as below: Go to Setup -> Develop -> Sites -> Click Site name -> ...
Lakshman's user avatar
  • 316
6 votes
Accepted

Formatting Time after clocks change

If the correct time zone to use when formatting all Site Guest User e-mails is British time, then choose British Summer Time (Europe/London) on that user account always. That should give you +00:00 in ...
Charles T's user avatar
  • 11k
6 votes

Clean way to vary sharing at runtime in Apex?

Your code is overly complicated because you presumed you needed an inner class in your RestResource class. You don't. The main problem is that you've reinvented the wheel with Sharing.Executable. ...
sfdcfox's user avatar
  • 497k
6 votes

'ParentId' field missing when deploying ExperienceBundle - 2GP

If you have enabled the ExperienceBundle Metadata API in the Dev Hub and you're still getting this error, remove the <networkMemberGroups> from the Network file of your Community. Due to a bug ...
TheLeonKing's user avatar
5 votes

Using SAML to authenticate user for a force.com site

If I understand your question correctly, this should be the approach you should be following. Force.com sites do support SSO using SAML. You need to provide the following info for your identity ...
Gaurav Kheterpal's user avatar
5 votes
Accepted

Apex validations removing parameters from url

If you don't put a rerender in the commandbutton, it will rerender the entire page if null is returned from the SaveResult method. And it rerenders the page without the page parameters. I guess the ...
Guy Clairbois's user avatar
5 votes
Accepted

How Can I Access Site.com Studio for a Community Builder Site After Winter '17?

Navigate to Communities | Builder Now observe the URL .Remove of all the extra parameters after domain.The URL would look like below https://googleflowauth-dev-ed--sitestudio.ap1.force.com/ This ...
Mohith Shrivastava's user avatar
5 votes
Accepted

How do I know the Public hosted URL of Visualforce page inside the controller class?

For a Salesforce Site, use the Site class. Namely, you can use Site.getBaseRequestUrl() to determine the current URL of the request. Returns the base URL of the current site for the requested URL. ...
sfdcfox's user avatar
  • 497k
5 votes
Accepted

Debug log for rest api site guest user

Since you are simply hitting a force.com site as a guest user you need to begin monitoring debug logs for the SITE name and not User. Assuming you site page code simply calls the rest method directly ...
Eric's user avatar
  • 54.2k
5 votes

Exposing Lightning app on force.com sites

This worked for me I Implemented implements="ltng:allowGuestAccess" in my app, and after adding the dependency resource I called my component. app <aura:application access="GLOBAL" extends="ltng:...
Gabriel Barbosa's user avatar
5 votes
Accepted

How can we cover code in test class under Site.createPortalUser?

You could certainly use mocking here. Create a virtual service class to call that method, and then your test classes can override the implementation. public virtual with sharing class SiteService { ...
Adrian Larson's user avatar
  • 151k
5 votes

Set Up Vanity URL

This article will walk you through it: https://help.salesforce.com/articleView?id=000205653&language=en_US&type=1 Basically, if you want the site to point to www.mycoolsite.com then you would ...
BritishBoyinDC's user avatar
5 votes
Accepted

Exposing an APEX REST endpoint to be called by Jira

If you do not want anonymous integration (you don't! It's rarely the right choice), you'll create a Connected App to define the rubric under which your Jira server will execute an OAuth authorization ...
David Reed's user avatar
  • 93.2k
5 votes

Sending email functionality is not working for site guest user of org

Make sure your Guest User has a valid email assigned. This is discussed in the article listed here.
Mohith Shrivastava's user avatar
4 votes

Use Lightning App in Sites

As part of spring 17 Lightning components can be added to unauthenticated sites using lightning out. below is the link https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/...
sfdc's user avatar
  • 13.7k
4 votes
Accepted

How to build a force.com sites that will work for both standard browsers and mobile users?

Visualforce, at its core, is HTML with proprietary markup options. Salesforce lets you modify the apex:page tag so that you can make the page look more like familiar HTML. For example: applyHtmlTag, ...
Curious Blueprints's user avatar
4 votes
Accepted

Queue email not being sent for custom object created via a public site

Yes, the default is not to send an email. If you're using a DML statement in your page, you can set the DmlOptions emailHeader. It looks approximately like this: Database.DmlOptions option = new ...
sfdcfox's user avatar
  • 497k
4 votes

Estimate salesforce project (custom object, controller, sites)

Unfortunately, there's a lot of variables that go into development, so the best you'll likely get here is an estimate that's 25%-400% of what you'll actually end up being billed for. I'll say this, ...
sfdcfox's user avatar
  • 497k

Only top scored, non community-wiki answers of a minimum length are eligible