Sample meta.xml code-
So next time when you add a lightning component in a page, search Master Label(
MyLWCComponent) in App builder.
Let me know your thoughts in the comment section!!
Xplore SFDC is a blog containing information regarding the salesforce and apex code scenarios. You will find resourceful content which will help you in day to day coding journey
Sample meta.xml code-
So next time when you add a lightning component in a page, search Master Label(
MyLWCComponent) in App builder.
Let me know your thoughts in the comment section!!
This keyword enforces sharing rules that apply to the current user. If absent, code is run under default system context. Use the with sharing keywords when declaring a class to enforce the sharing rules that apply to the current user. Use With Sharing when the User has access to the records being updated via Role, Sharing Rules, Sales Teams – any sort of sharing really.
Example:
public with sharing class sharingClass {
// Code here
}
Ensures that the sharing rules of the current user are not enforced. Use the without sharing keywords when declaring a class to ensure that the sharing rules for the current user are not enforced. For example, you may want to explicitly turn off sharing rule enforcement when a class acquires sharing rules when it is called from another class that is declared using with sharing. Without Sharing is reserved for cases where the User does not have access to the records, but there is a need to update them based on user input.
public without sharing class noSharing {
// Code here
}
Salesforce integration is the process of merging the data and functionality of Salesforce with another application to provide users with a single unified experience. It allows you to provide your team with an ideal mix of features pertaining to both platforms.
These classes expose the HTTP request and response functionality.
Http Class: Use this class to initiate an HTTP request and response.
HttpRequest Class: Use this class to programmatically create HTTP requests like GET, POST, PATCH, PUT, and DELETE.
HttpResponse Class: Use this class to handle the HTTP response returned by HTTP.
Most common HTTP methods:
1. GET : The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.
2. POST : A POST request is used to send data to the server and create the record.
3. PUT : PUT is used to send data to a server to create/update a resource. Replaces all the current representations of the target resource with the uploaded content.
4. PATCH : PATCH is used to update partial resources. For instance, when you only need to update one field of the resource, PUTting a complete resource representation might be cumbersome and utilizes more bandwidth.
5. HEAD : HEAD is almost identical to GET, but without the response body. HEAD transfers the status line and the header section only.
6. DELETE : The DELETE method deletes the specified resource.
7. OPTIONS : The OPTIONS method describes the communication options for the target resource.
First of all, we need to understand why do we need to chain the batch jobs?
Lets take an example:
We have two requirements to do in code. First we need to delete all the contacts and then insert the new contacts received from Integration. In this case, we can have two batch jobs. First job will delete the contacts and then second job will insert the new contacts.
In other words, Chaining jobs is useful if your process depends on another process to have run first.
Call another batch in finish method so that all the processing of first job is completed and system will have the updated data before the second job.
If your logic is based on rows from an SObject then the Database.QueryLocator
is the way to go as that allows the batchable to query very large numbers of records.
But sometimes you may want to do some work that isn't directly related to SObject rows. In that case the iterable object can simply be an array/list: