Skip to main content

Posts

Showing posts from 2018

Embed Wave in Any Web Page or Web-Based App using Lightning out

 Embed Wave in Any Web Page or Web-Based App using Lightning out   As per the salesforce document Embed Dashboards Everywhere ,To embed Analytics in any web page or web-based app,   First, We need to add an Analytics dashboard component to your site, using Visualforce embedding, Lightning App Builder, or Lightning Out. This code sample shows how to add an Analytics dashboard component via Lightning Out. $Lightning.use("wave:waveApp", function() { $Lightning.createComponent("wave:waveDashboard", { dashboardId: "0FKxx00000006bOGAQ" }, "app"); }, url, accessToken) Second, set up a whitelist using the Content Security Policy (CSP). See Set Up a Whitelist of Trusted Sites for Embedded Analytics Dashboards. The whitelist for embedded Analytics includes the following by default: *.salesforce.com:* *.force.com:* Your org’s custom domain. However while implementing the above code, We might face some errors regarding CORS or Lightning errors eve...

Invalid_grant Authentication Failure in Username-Password Oauth flow

Sometimes the delegated authentication is configured in the customer's org for the logged-in user. So when the username and password is given during login, the authentication will be done via delegated authentication server, not by salesforce. We have seen a strange behavior in Username-Password OAUTH flow (Sept 6, 2018) when the request is made from API and Apex. 1. When OAUTH request made via api, You can pass external auth server password. grant_type:password username:username@gmail.com password:password  // This can be external system password client_id:3MV***log.W client_secret:65***58 2. When OAUTH request made via apex, The password should be salesforce password along with security token. If the external system password is given, you will get the below error 13:26:23.1 (5805772)|CALLOUT_REQUEST|[74]|System.HttpRequest[Endpoint=https://****.my.salesforce.com/services/oauth2/token, Method=POST] 13:26:23.1 (357570230)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:952 13:26:23.1 (357762371)|CA...

Sales flow : From Lead to Quote Process in Salesforce

 A lead is someone who is interested in the products or services from your organization. These leads in salesforce are generated via Campaigns, Content Marketing, Seminars and Advertising etc. Technically in Salesforce, Leads are created via 1. Manual creation 2. Bulk File import 3. Social Media 4. Out-of-Box functionality such as Web-to-Lead or Email to Lead 5. Email Services 6. Live Agent (Chat sessions) 7. CTI integration (Tele Sales) 8. Integration from other Systems Once the lead is qualified, It can be converted into Salesforce Account, Contact and Opportunity . Account, Contact and Opportunity :  Account is a company or a person with whom your company has relationship. Contact represents a person from the account we have relationship. An opportunity represents a prospective sale and it contains relevant sales data. Once opportunity is created and it has to go through various stages before it is closed. These stages can be customized as per our company needs. The ...

Salesforce OAUTH Error "We can't authorize you because of an OAuth error. For more information, contact your Salesforce administrator"

 Salesforce oauth_error_code=1800 is generic error which say OAuth flow has been broken. The below list contains a few reasons when we see this error message 1. Sometimes corrupted cookies can cause this issue. Test the OAUTH flow by clearing cookies or using Private window of the browser. 2. Time out issue : Oauth login has 15-30 minutes of grace period during which Oauth approval process has to be completed. Otherwise this error can happen.  3. Lack of necessary permissions such as API, Apex, Visualforce permissions for the user 4. If OAuth and SAML is involved with the flow, The error usually indicates that there is relayState issue. 5. Any other internal server error at Salesforce platform which can be solved by raising the case with Support.

Custom Lightning component not showing in Community Builder

 Sometimes We can see that the lightning component we create, will not be displayed under ' Custom Components ' of community builder. There are a few reasons for that.    1. Make sure that the component implements the interface ' flexipage:availableForAllPageTypes ' and access level to ' global '.    2. Sometimes Lightning component can have design file which renames the component name. The component will be displayed with the label name provided in design file.  HelloWorld.cmp <design:component label=" Welcome "> The above component will be displayed with the name ' Welcome ' in Community builder. 3. Also Object specific Lightning Components are not available in the Component list in Community Builder. For this kind of errors, the most likely cause is that the page variation needed for that specific component has been deleted. Ref : https://help.salesforce.com/articleView?id=000257309&type=1&language=en_US 4.When access...