Developers usually get strange requests from client to make some of the text clickable so that if a user clicks on that field in record it should redirect to detailed page of that record. We know that standard Name field already does similar task. However there will be a scenario where client uses Standard name field as auto number field and a custom field to save proper name and requests for a clickable link on the custom field and requests to make it clickable.
There are multiple ways in which we can perform this task. But in this blog we will see 2 ways using formula field.
One simple way that everyone follows is using a relative URL, where you can create a custom formula field and use relative URL with record Id.
Sales reps depend on 2 important tools one is CRM to store information related to opportunities and leads and second is emails to communicate with contacts. CRM and Email are 2 different applications and sometimes it is annoying to toggle between apps to create records in salesforce when user is busy following up with multiple clients or customers at a time viz emails. It is also important to keep track of all interactions, activities and events into Salesforce.
The “Salesforce Lightning for Outlook” add-in can solve this problem. This plugin will give user a small side window panel, where user can create records in salesforce without having to login to salesforce separately in a browser. This will be like mobile version of salesforce in outlook.
Once you install the plugin, you need to login to either sandbox instance or Production Instance. You can create records of almost all objects. If you want a specific record type record to be created, you can create Global Actions for the same. This is a standard feature of salesforce.
There will be some scenarios where you may need to customize things as per business scenarios. And to add the custom-built logic, sometimes you need to build a custom solution either in Lightning Aura Component or in Lightning Web Component. But how to add the custom build module in the side panel in your outlook or Gmail plugin, we will see that in this post.
Use the lightning-record-edit-form component to create a form that’s used to add a Salesforce record or update fields in an existing record. If you need a solution with custom screen, you need to use this tag. Whole layout need to be customized. The component displays fields with their labels and the current values, and enables you to edit their values.
lightning-record-edit-form supports the following features.
Editing a record’s specified fields, given the record ID.
Creating a record using specified fields.
Customizing the form layout
Custom rendering of record data.
If there is no customization required then you can go ahead with <lightning-record-form /> tag for development.
To Create, Edit and View a record “Quickly” you can use “<lightning-record-form />” tag. Salesforce automatically Loads all fields in the object’s compact or full layout, or only the fields you specify. There is no manual custom field tag that user need to add and customize the layout. Salesforce handles everything for you including the lookup fields.
Overall if you are looking for a quick solution to create a record instantly, you can go with <lightning-record-form />.
Every tag comes with some attributes. For this tag there are few important attributes that are usually used.
When working in apex, sometimes you need field’s label name and API name and other details. Below is a sample code which can be used to fetch details of any object’s field, its Label, its Name(API Name), and an attribute to check if it’s a custom field or no. There are other options too which can be referred as per business requirement.
SVG stands for “Scalable Vector Graphics”. SVG defines vector-based graphics in XML format. Every element and every attribute in SVG files can be animated. SVG resource in lightning bundle can be used to define custom icons for your component. Here we are speaking about the icons and not logo. Icon and logo can look similar just like my blog’s icon and logo. But both are different. SVG deals with icons. By default if you see any component in salesforce, you can observe that default icon is .
In design section you can control which attributes are exposed to builder tools like the Lightning App Builder, Experience Builder, or Flow Builder. A design resource lives in the same folder as yours .cmp resource, and describes the design-time behavior of the Aura component—information that visual tools need to display the component in a page or app.
<design:component label="Hello World">
<design:attribute name="subject" label="Subject" description="Name of the person you want to greet" />
<design:attribute name="greeting" label="Greeting" />
Renderer in Client-side is to override default rendering for a component. You can consider what data should render on load or on reload. The framework’s rendering service takes in-memory component state and creates and manages the DOM elements owned by the component. If you want to modify DOM elements created by the framework for a component, you can modify the DOM elements in the component’s renderer. Otherwise, the framework will override your changes when the component is rerendered.
The base component in the framework is aura:component. Every component extends this base component.
This renderer has base implementations for the four phases of the rendering and rerendering cycles: