Tags
I know it is a long time, but very happy to share that I have written a blog on Einstein GPT in my company website. It is published at the link below and enjoy reading it,Thanks!
06 Saturday May 2023
Posted AI, Uncategorized
inTags
I know it is a long time, but very happy to share that I have written a blog on Einstein GPT in my company website. It is published at the link below and enjoy reading it,Thanks!
03 Monday Jan 2022
Posted Uncategorized
inLet’s say we are using lightning-record-edit form in LWC to display/edit the data and we have a requirement to get the field values during the onLoad event of the form.
For instance, onLoad event calls handleOnLoad method and the code below shows the right approach to get the field values from the form based on the recordId:
handleOnLoad(event) {
var record = event.detail.records;
var fields = record[this.recordId].fields;(obviously we need to have the recordId declared as @api decorator and the lwc is placed on the record page. Please refer the link https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_record_context to read more about it)
const assetName = fields.Name.value;
alert(assetName);
}
We can use template.querySelector as well(as given below), but it is not the right approach(rather not a good approach):
handleOnLoad() {
let name = this.template.querySelector('.name').value;//in the html, we should have given class="name" for the name field
}
Hope this post is helpful and let me know for any questions. Thanks!!
08 Sunday Aug 2021
Posted Uncategorized
inTags
To check if the logged in user is a Guest user or not in the APEX code, we can make use of the method isGuestUser() in Auth.CommunitiesUtil class where Auth is the namespace that provides an interface and classes for single sign-on into Salesforce and session security management.
if(Auth.CommunitiesUtil.isGuestUser())
{
<call method X>
}
else
{
<call method Y>
}
Also, there is a method isInternalUser() which returns true if the logged in user is an employee or the Internal user.
Hope this post is helpful!!
07 Saturday Aug 2021
Posted Uncategorized
inRecently, as part of Summer 21 release, Salesforce has given us an option to call the LWC directly from the Quick Action, earlier we had to call Lightning Component(LC) from the Quick Action and call the LWC from LC.
In my current project, I had created a Quick Action called “Edit” and to close the Quick Action when user clicks on Cancel button inside the modal, we had to do the following:
import { CloseActionScreenEvent } from ‘lightning/actions’;
Let’s say the method closeModal is called, when user clicks on Cancel button:
closeModal() {
this.dispatchEvent(new CloseActionScreenEvent());
}
To create the modal when user clicks on Edit button, we have not used lightning-quick-action-panel component(Beta) and used Modals blueprint in SLDS. Please refer the above link for creating a Quick Action and calling the LWC from it:
https://developer.salesforce.com/blogs/2021/05/learn-moar-with-summer-21-lwc-quick-actions
Documentation for the lightning-quick-action-panel is available in the below link:
Thanks and see you all at the next post!!
P.S: Tried Anchor PodCast tool for this blog post:) and here is the link https://anchor.fm/manibalan-sampathkumar/episodes/How-to-Close-Quick-action-in-LWC-e15j8ta
15 Tuesday May 2018
Tags
I have faced this issue recently in my current project [Later on, I realized that I was aware of this issue earlier perhaps 3 yrs ago when I was working in the consulting firm, my bad memory:)]. The requirement is to create the calendar event when the record is created in one of our Custom object based on the start and end date fields in it.
I created a process builder and it gets triggered when the new record is created in the Custom object. Immediate action in the process builder is to create a record in Event object.
It works fine when the difference in start and end date is less than or equal to 14 days (duration of the event is less than or equal to 14 days) else it throws an error ”
Vote for the below idea so that salesforce removes this limit in the calendar event:
https://success.salesforce.com/ideaView?id=08730000000Guw6AAC
Workaround: I created a flow to create events based on the start and end date. Suppose, start and end date span for 6 months(Start date=15/5/2018 and End date=15/11/2018), split them into 14 days and create events accordingly. So, in this case, I would have created 13 event records approximately from 15/5/2018.
Please comment below for any questions on this.
29 Sunday Apr 2018
Tags
Recently, when I tried creating a lookup relationship with the Product (Standard Object) from the custom object, I got the below error though I was not trying to create the Master Detail relationship:
You cannot create a new Master-Detail relationship on an existing custom object if records already exist. You must first create a Lookup relationship, populate the lookup field with data in all records, and then change the relationship type to Master-Detail.
Moreover, the custom object was a new object and it did not have any records. I was bit confused and the error message is misleading as well. Then, after googling, it looks like you can create a lookup field to Product only if you allow to clear the field if the Product record is deleted(please check the below screenshot for your reference):
Please let me know for any clarification.
29 Sunday Apr 2018
Tags
Please find the release notes link below:
http://releasenotes.docs.salesforce.com/en-us/spring18/release-notes/salesforce_release_notes.htm
29 Sunday Apr 2018
Tags
Please find the release notes link below:
http://releasenotes.docs.salesforce.com/en-us/spring18/release-notes/salesforce_release_notes.htm
29 Sunday Apr 2018
Please find the release notes link below:
https://releasenotes.docs.salesforce.com/en-us/spring18/release-notes/salesforce_release_notes.htm
23 Saturday Dec 2017
Posted Uncategorized
inI was using ANT Migration tool to deploy the components(e.g. Layouts, classes etc) from my machine to Sandbox last week. But, for some reason, though I have given the correct user name and password in build.properties file, it was giving me authentication error(Invalid username, password, security token; or user locked out). I tried the same user name and password to log into Salesforce Sandbox using browser, I could login into it successfully. This looked very strange to me and then I found out the issue:
my password had two $ signs and for some reason, ANT was not able to recognise them. After, I changed the password by excluding the $ signs, it worked.
I thought of sharing this as it would help someone who face this issue since I had to spend about an hour to figure out the issue.