Anjali
IndividualForum Replies Created
-
Please refer the below link-
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/create_components_css_slds -
Just make sure you setup your Named Credential using OAuth Authentication to start with rather than password authentication.
-
Anjali
MemberDecember 29, 2020 at 9:17 am in reply to: What is the difference between constructor and connectedcallback in LWC?constructor() is called when the element is created.
connectedCallback() is called when (after) the element is attached to the DOM. -
Anjali
MemberDecember 24, 2020 at 1:56 pm in reply to: Is it possible to map formula fields by Data import wizard in Salesforce?The Data Import Wizard tries to map as many of your data fields as possible to standard Salesforce data fields. If Salesforce can't automatically map fields, however, you do it manually. Unmapped fields are not imported into Salesforce.
-
Anjali
MemberDecember 23, 2020 at 2:29 pm in reply to: In which scenarios do you need to know your Trailhead playground username and paif you're authorizing your org for use with the Salesforce Command-Line Interface (CLI), or signing into it on your phone to see how something looks on mobile. In most Trailhead Playgrounds, it's easy to reset your password.
-
Anjali
MemberDecember 23, 2020 at 2:27 pm in reply to: When should you change your username in Trailhead playground?Never change your username in a Trailhead Playground. This prevents Trailhead from checking your work and awarding badges/points for completing challenges.
-
Anjali
MemberDecember 23, 2020 at 2:23 pm in reply to: What's one reason to sign up for trailhead with a social media account?You'll still be able to log in no matter where your career takes you.
-
Anjali
MemberDecember 21, 2020 at 2:11 pm in reply to: What is difference between Singleton and immutable class?An immutable object is initialized by its constructor only, while a singleton is instantiated by a static method. A set of functions (or static methods) which manipulate some shared mutable state constitute a singleton. This implies that every mutable member of a singleton collection is itself a singleton.
-
Anjali
MemberDecember 21, 2020 at 2:10 pm in reply to: What is difference between static and singleton class?A singleton allows access to a single created instance - that instance (or rather, a reference to that instance) can be passed as a parameter to other methods, and treated as a normal object. A static class allows only static methods. Singleton objects are stored in Heap, but static objects are stored in stack.
-
Anjali
MemberDecember 21, 2020 at 2:09 pm in reply to: Why can't we use static class instead of Singleton?Static means that it belongs to a class it is in and not to any instance. So it cannot be a top level class. - Static class will have all its member as static only unlike Singleton. - It can be lazily loaded whereas static will be initialized whenever it is first loaded.
-
Anjali
MemberDecember 18, 2020 at 1:16 pm in reply to: What decorators are available in LWC Lightning Web component?Decorator is a part of ECMA script and used to add extra functionality in your function or methods. In LWC we use 3 decorator to enhance the functionality of our property or function.
-
Anjali
MemberDecember 18, 2020 at 1:14 pm in reply to: How do I create the record in Lightning Web Component without using Apex?You can create a record by using lightning record form, here is the link hat you can refer-
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/data_create_record -
This is one of life cycle hook in web component JavaScript. connectedCallBack function invokes/fires automatically when certain lwc component inserted into web dom. It is works like init handler in lightning aura component, we can say it is lwc init handler.
-
Web Components provide strong encapsulation for reusable components, while React provides a declarative library that keeps the DOM in sync with your data. As a developer, you are free to use React in your Web Components, or to use Web Components in React, or both.
-
Anjali
MemberDecember 16, 2020 at 2:36 pm in reply to: How do you lock the records from being edited by others in SOQL?To lock a set of sObject records in Apex, embed the keywords FOR UPDATE after any inline SOQL statement. For example, the following statement, in addition to querying for two accounts, also locks the accounts that are returned: Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];
-
When an sObject record is locked, no other client or user is allowed to make updates either through code or the Salesforce user interface. The client locking the records can perform logic on the records and make updates with the guarantee that the locked records won’t be changed by another client during the lock period.
-
Anjali
MemberDecember 15, 2020 at 2:33 pm in reply to: How can you lock record using SOQL so that it Cannot be modified by other user?By using FOR UPDATE clause in your SOQL statement.
-
Granular locking can help customers who experience these locking issues. Without this feature, our code locks the entire table that keeps track of people’s membership in various groups. This means that any two administrative operations that change roles, public groups, or territories will conflict if they happen simultaneously.
-
Anjali
MemberDecember 15, 2020 at 2:14 pm in reply to: Is it possible for a user to own a record and not see it in Salesforce?Yes it is possible if the user did not have the read access for that object.
-
Anjali
MemberDecember 11, 2020 at 12:42 pm in reply to: How do you use the map in the lightning component?({ doInit: function(component, event, helper) {
var action = component. get('c.getMyMap'); action. ...
var state = response. getState(); if (state === "SUCCESS") {
//set response value(map) in myMap attribute on component. component. set('v.myMap',response. ...
}); $A. enqueueAction(action); -
Anjali
MemberDecember 11, 2020 at 12:37 pm in reply to: How do you use the wrapper class list in lightning component?@AuraEnabled
public static List<Wrapperclass> saveDataDML(String listToSaveString){
List<Wrapperclass> listToSave = (List<Wrapperclass>)JSON.deserialize(listToSaveString, List<Wrapperclass>.class); -
Please refer the below link-
https://www.forcetalks.com/blog/how-to-use-wrapper-class-in-salesforce-lightning-component/ -
Anjali
MemberDecember 10, 2020 at 1:21 pm in reply to: How do I call apex method in the Lightning web component?To expose an Apex method to a Lightning web component, the method must be static and either global or public . Annotate the method with @AuraEnabled .
-
Lightning web components(LWC) use a reactive wire service, which is built on Lightning Data Service. Components use @wire in their JavaScript class to read data from one of the wire adapters in the lightning/ui*Apimodules and also to call the apex controller server-side methods using wire services.
-
Anjali
MemberDecember 9, 2020 at 2:20 pm in reply to: Can we call Visualforce page from lightning component?You can look to this code-
gotoURL : function(component, event, helper) {
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url":"/apex/vfpagename?parametername="+"parametervalue"
});
urlEvent.fire(); }