Skip to main content

Salesforce-BrowserCookie for Site Users

Salesforce: Set a Browser Cookie to Enable Debug Logging for Guest Users
Earlier it was very easy to create a debug log for Site Guest User. We just needed to request a debug log for the Site Guest User and the logs were generated without any hassle.

But after the Winter 17 release, you now also need to set a server cookie in the browser to enable debug logs for Site Guest Users. This means that debug logs will only be generated for those doing the debugging, not everyone accessing the site. This is true for sandboxes also.

Follow the below steps to generate a debug log from a Force.com Site Guest User:
1. Request a debug log the Site Guest User like we do for a Salesforce User.
2. Open the Force.com Site URL.
3. Press F12 or Ctrl+Shift+i to open the browser debugger.
4. Open the console of the debugger.
5. Write the below code in the console and press Enter:
document.cookie="debug_logs=debug_logs;domain=.force.com"



6. Do some action on the Force.com site and refresh the debug logs. You will see the new debug logs.


Comments

  1. Маван наки наки наки наки наки наки наки наки наки наки наки наки наки наки наки
    Маван наки наки наки наки наки наки silicone dab rig with titanium nail наки наки Наван. СТННН ТН ТН ТНН - СТН titanium wedding band ТН ТН - seiko titanium watch СТН babylisspro nano titanium hair dryer Т titanium fitness

    ReplyDelete

Post a Comment

Popular posts from this blog

Creating Remote Site Settings Dynamically

As remote site setting is essential for making callouts to external systems. We can create remote site through apex code: Steps: 1.       Add a metadataService class either through WSDL or you can use attached  file: metadataService.class 2.       Use below code: public void createRemoteSiteSetting (){     MetadataService.MetadataPort service = createService();     MetadataService.RemoteSiteSetting remoteSiteSettings = new MetadataService.RemoteSiteSetting();     remoteSiteSettings.fullName = ‘abc123';     remoteSiteSettings.url = 'http://www.clrdp727.com';     remoteSiteSettings.isActive=true;     remoteSiteSettings.disableProtocolSecurity=false;     service.createMetadata(new List<MetadataService.Metadata> { remoteSiteSettings }); } // This method returns the metadata service, using this we can fire action to create the remote site settings. public static MetadataService.MetadataPort createService () {     MetadataService.Metadat

Fetching the list of Classes along with their code coverage using API

Tooling API Fetching the list of Classes along with their code coverage using Tooling API We can find the list of classes along with their code coverages from external system. PFB code to fetch the list of classes along with their coverage details, Using  Tooling API. (Here rest call is made, same can be implemented by SOAP). ----------------------------------------------------------------------------------------------------------------------     HTTPRequest req = new HTTPRequest();     String myQuery=’ select+id,ApexClassOrTrigger.Name,NumLinesCovered,NumLinesUncovered+from+ApexCodeCoverageAggregate’;     req.setEndpoint('<Login Instance> /services/data/v39.0/tooling/query/?q= '+myQuery); // Login Instance Example:  https://demo727-dev-ed.my.salesforce.com     req.setMethod('GET');     req.setHeader('Authorization', 'Bearer ' +<Enter the Session Id>); // Example: UserInfo.getSessionId()     Http h = new Http();     H

Salesforce Certified Administrator - Spring '18 Release Exam Questions

Hi, Below are the questions of the Salesforce Certified Administrator - Spring '18 Release Exam. Q1 . Which three functions are available with chart enhancements in lightning experience? Choose 3 Answers A. Download Chart images from dashboard components. B. Combine small groups into "others" on any chart. C. Show total in the center of donut charts. D. Set Chart legend position. E. Display upto 2,000 groups in line and bar charts in dashboards. Ans: ACD. Q2 . Which functionality is available to a support agent directly from the case feed? A. Configure an email template. B. Mass Email. C. Reply and forward an email. D. Delete an Email. Ans: C. Q3. What must the administrator consider when enabling Themes? A. There is no built-in theme if a custom theme is not created. B. Any user can select a theme and avatar based on their role. C. Only one theme can be active at a time and is applied to the entire org. D. Chatter External users also see the custom theme. Ans: C. Q4 . W