Posts

Showing posts from 2017

Design thinking in Salesforce

Image
Overview Presently what i have noticed that we focus more on the problem based thinking, where we just target to provide the solution to the problem.    When we get a problem we straight away jump into analyzing it and finding a solution.  We do analysis of the problem and break down an intellectual or substantial whole into parts of components.  But have we through of what benefit we are doing to the issue?  So put this in a better place and justify our approach of solving our problem, we take shelter of Design thinking . Design thinking has analysis but it also includes synthesis as well. Now you would ask what is Synthesis? Synthesis is defined as the opposite procedure: we combine separated components so as we can build a complete solutions. However, analysis and synthesis, as scientific methods, always go hand in hand; they complement one another. Every synthesis is built upon the results of a preceding analysis, and every analysis requires a su...

lightning:accordion

Image
Winter 18 New  Lightning Components   lightning:accordion Accordions are the vertically stacked sections which can contain many sections holding contents inside them.  This is the new component which was added as part of Winter 18 release.  Earlier the same was build using Html and javascript code. This components groups all of the related contents in a single container. Only one can be expanded at a time and all others will be in collapsed state. Use attribute " activeSectionName " to select the default section you want it to be expanded. Each section can contain one or more lightning components. The design is inherited from the accordion in lightning design system. For additional styling use the "Class" attribute with helper classes of lightning design system.  Below is the example of how to use accordion on the lightning components.  Section A is expanded by default  Section B contains another lightning compo...

Batch class on External objects

Overview As you know, we use lightning connect to integrate external databases with Salesforce.  You can pull data from legacy systems such as SAP, Microsoft and Oracle in real time, without making a copy of the data in Salesforce. Salesforce Connect maps data tables in external systems to external objects in your org. Read more about Lightning Connect            Sometime there is a requirement to copy the data in the External object to some custom object in your Org. As there is no way you can write trigger or Apex managed sharing on the External Object, so that you can move the same data to the custom object. The only way is to write batch class on the external object, schedule it on daily basis to copy data to the custom objects. Previously, only Iterable<sObject> was supported. When you use Iterable<sObject> you cannot query more than 2000 records in iterable class and you get below error: Error : First Error : Inline...

Encoding URL in Tooling API call

Encoding URL in Tooling API: When using Tooling API to fetch the metadata for a particular component, we add query in the endpoint URL many times. Sometime the parameters we add has a space in between. If you insert a keyword with a space in the endpoint URL, calling the Tooling API through Rest will throw below error: Tooling API Call: String query = '/services/data/v40.0/tooling/query/?q=Select+id,Name,Metadata+from+Profile+where+name+=\''+profileName+'\'';         req.setEndpoint(baseURL + query); The profileName variable hold 'System Administrator' ERROR: 13:16:25:020 CALLOUT_RESPONSE [75]|System.HttpResponse[Status=Unknown Version, StatusCode=400] 13:16:25:021 USER_DEBUG [77]|DEBUG|response<h1>Bad Message 400</h1><pre>reason: Unknown Version</pre> To resolve this error make sure to encode the endpoint URL with method urlEncode() of EncodingUtil class. Something as below: String query = '/services/data/...
Hi Friends I thought to share my knowledge with you all through blogs. In coming days i will be contributing  with some salesforce technical stuffs, that may help you in some of your implementations. See you soon :) Thanks Anupam