• Anand Avinash Dosapati
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 12
    Replies
Hi All,

Expected behaviour:
upon clicking Cancel on the Lightning.confirm popup should uncheck the checkbox (lightning-input)

Current behaviour:
The checkbox remains checked. By refreshing the browser then the checkbox is unchecked.
tried with the following but no luck
event.target.checked = false;
event.detail.checked = false;



JS:
async handleShowPopUp(itemId, isChecked, dataIndex, event) {

        const result = await LightningConfirm.open({
            message: 'Are you sure you want to continue?,
            variant: 'header',
            label: 'Confirmation'
        });
        if (result) {
            event.detail.disabled = true;
            this.handleTosetCheckboxItem(itemId, isChecked);
        }
        else {
           // alert(result);
            event.target.checked = false;
            this.items[dataIndex].Checked__c = false;
        }
    }
HTML:
<lightning-layout-item class="slds-p-around_x-small" size="1">
                                <lightning-input data-id={item.Id} data-dindex={index} type="checkbox"
                                    disabled={item.milestoneDisable} variant="label-hidden" label={item.Details__c}
                                    checked={item.Checked__c} onchange={handleItemChanged}></lightning-input>
                            </lightning-layout-item>

 

Thanks inadvance
 

Hi Trailblazers,

I have enabled Multi currencies, Parantheical Currency and Advanced Currency management. The values on opportunity are as expected and as per the conversion rates i entered in the dated exchange rates. However, the Parenthetical Currency values on custom object are not in sync with values on opportunity. Please advise what i am missing here

On Opportunity:

User-added image


On Custom Object:
User-added image
Hello Friends,

I have the following simple VF page which is giving the metioned error. I verified with back slash and curely braces suggestions from other posts which didn't helped me to fix the issue.
 The below VF page is invoked by clicking a custom button.

Please help me to identify and fix the issue
<apex:page standardController="Opportunity" extensions="SendRetainerController" showHeader="false" sidebar="false" action="{!SendRA}">


</apex:page>

Error:

User-added image

 
Hello,

I am currently evaluating various Document generator apps which has the following features. Kindly provide your suggestions and experiences

1. Easy to set up by an Admin without involving developer and minimal coding
2. Ability to Autosend emails without coding
3. Easy template creation process
4. ofcourse, As economical as possible.

I am currently reviewing the following.
A5 Documents
Sdocs
Nintex Drawloop DocGen: Expensive among the other in the list
DocuSign: Found that Autosend emails feature is not available and needs coding to achieve it
Hello Gurus,

I am a newbie for apex & integrations.
In my org, ScheduleOnce was used to sync SF events to Google Calendar events for Create/Delete actions. Now, I would like to a custom integration leveraging Trigger (After Update) to call Delete API https://developers.google.com/calendar/v3/reference/events/delete when the event status is set to 'Cancelled'. To delete an event, EventId should be passed. The only way I could think of to get the Google Event ID is to pass the subject, start and end times and get it. kindly provide some inputs on how to get the Google Event ID.
https://developers.google.com/calendar/v3/reference/events/get

Thanks in advance
Hello Gurus,

I am trying to write a validation rule on the standard Phone field which fulfils the following. The value should be accepted only if it starts with "001" otherwise a validation error should be thrown.
I have tried both the following and were successful in checking the prefix but failing in other cases.

1. 
LEFT(Phone, 3) <> "001"

2.
 AND(
NOT(ISBLANK(Phone)),
NOT(REGEX(Phone,"[001]{3}[1-9]{1}[0-9]{9}"))
)
Hello Gurus,

I faced the following exception when I am closing a case. The behaviour with the rest of the cases is normal. Something is missing with this, which I am not able to identify. FYR, I providing the code and the exception. Please help me understand.

Exception/Error:
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger Email2CaseSharing caused an unexpected exception, contact your administrator: Email2CaseSharing: execution of BeforeUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Email2CaseSharing: line 30, column 1




Code:
trigger Email2CaseSharing on Case (before insert, before update, after insert, after update) {
  
  Set<Id> contactIds = new Set<Id>();
    
    for(Case c : Trigger.new) {
        
        if(c.Origin != null && c.Origin == 'Email' && c.ContactId != null) {
            contactIds.add(c.ContactId);
        }
    }
    
    if(!contactIds.isEmpty()) {
      Map<String, String> contactEmails = new Map<String, String>();
      Map<String, User> emails = new Map<String, User>();
        for(Contact c : [SELECT Id, Email FROM Contact WHERE Id IN :contactIds]) {
            contactEmails.put(c.Id, c.Email);
            emails.put(c.Email, null);
        }
        for(User u : [SELECT Id, Email FROM User WHERE Email IN :emails.keySet()]) {
            emails.put(u.Email, u);
        }
        
        List<CaseShare> shares = new List<CaseShare>();
        
        for(Case c : Trigger.new) {
        
            if(c.Origin != null && c.Origin == 'Email' && c.ContactId != null) {
                
                Id uid = emails.get(contactEmails.get(c.ContactId)).Id;
                
                if(Trigger.isBefore) {
                  c.Submitter__c = uid;
                } else {
                  CaseShare cs = new CaseShare(
                    CaseId = c.Id,
                      UserOrGroupId = uid,
                      CaseAccessLevel = 'Read'
                  );
                  shares.add(cs);
                }
            }
        }
        
        try {
          if(!shares.isEmpty()) {
              insert shares;
          }
        } catch(Exception e) {
          System.debug(e.getStacktraceString());
        }
    }
}

 
Hi Trailblazers,

I have enabled Multi currencies, Parantheical Currency and Advanced Currency management. The values on opportunity are as expected and as per the conversion rates i entered in the dated exchange rates. However, the Parenthetical Currency values on custom object are not in sync with values on opportunity. Please advise what i am missing here

On Opportunity:

User-added image


On Custom Object:
User-added image
Hello Friends,

I have the following simple VF page which is giving the metioned error. I verified with back slash and curely braces suggestions from other posts which didn't helped me to fix the issue.
 The below VF page is invoked by clicking a custom button.

Please help me to identify and fix the issue
<apex:page standardController="Opportunity" extensions="SendRetainerController" showHeader="false" sidebar="false" action="{!SendRA}">


</apex:page>

Error:

User-added image

 
Hello,

I am currently evaluating various Document generator apps which has the following features. Kindly provide your suggestions and experiences

1. Easy to set up by an Admin without involving developer and minimal coding
2. Ability to Autosend emails without coding
3. Easy template creation process
4. ofcourse, As economical as possible.

I am currently reviewing the following.
A5 Documents
Sdocs
Nintex Drawloop DocGen: Expensive among the other in the list
DocuSign: Found that Autosend emails feature is not available and needs coding to achieve it
Hello Gurus,

I am a newbie for apex & integrations.
In my org, ScheduleOnce was used to sync SF events to Google Calendar events for Create/Delete actions. Now, I would like to a custom integration leveraging Trigger (After Update) to call Delete API https://developers.google.com/calendar/v3/reference/events/delete when the event status is set to 'Cancelled'. To delete an event, EventId should be passed. The only way I could think of to get the Google Event ID is to pass the subject, start and end times and get it. kindly provide some inputs on how to get the Google Event ID.
https://developers.google.com/calendar/v3/reference/events/get

Thanks in advance
Hello Gurus,

I am trying to write a validation rule on the standard Phone field which fulfils the following. The value should be accepted only if it starts with "001" otherwise a validation error should be thrown.
I have tried both the following and were successful in checking the prefix but failing in other cases.

1. 
LEFT(Phone, 3) <> "001"

2.
 AND(
NOT(ISBLANK(Phone)),
NOT(REGEX(Phone,"[001]{3}[1-9]{1}[0-9]{9}"))
)
Hello Gurus,

I faced the following exception when I am closing a case. The behaviour with the rest of the cases is normal. Something is missing with this, which I am not able to identify. FYR, I providing the code and the exception. Please help me understand.

Exception/Error:
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger Email2CaseSharing caused an unexpected exception, contact your administrator: Email2CaseSharing: execution of BeforeUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.Email2CaseSharing: line 30, column 1




Code:
trigger Email2CaseSharing on Case (before insert, before update, after insert, after update) {
  
  Set<Id> contactIds = new Set<Id>();
    
    for(Case c : Trigger.new) {
        
        if(c.Origin != null && c.Origin == 'Email' && c.ContactId != null) {
            contactIds.add(c.ContactId);
        }
    }
    
    if(!contactIds.isEmpty()) {
      Map<String, String> contactEmails = new Map<String, String>();
      Map<String, User> emails = new Map<String, User>();
        for(Contact c : [SELECT Id, Email FROM Contact WHERE Id IN :contactIds]) {
            contactEmails.put(c.Id, c.Email);
            emails.put(c.Email, null);
        }
        for(User u : [SELECT Id, Email FROM User WHERE Email IN :emails.keySet()]) {
            emails.put(u.Email, u);
        }
        
        List<CaseShare> shares = new List<CaseShare>();
        
        for(Case c : Trigger.new) {
        
            if(c.Origin != null && c.Origin == 'Email' && c.ContactId != null) {
                
                Id uid = emails.get(contactEmails.get(c.ContactId)).Id;
                
                if(Trigger.isBefore) {
                  c.Submitter__c = uid;
                } else {
                  CaseShare cs = new CaseShare(
                    CaseId = c.Id,
                      UserOrGroupId = uid,
                      CaseAccessLevel = 'Read'
                  );
                  shares.add(cs);
                }
            }
        }
        
        try {
          if(!shares.isEmpty()) {
              insert shares;
          }
        } catch(Exception e) {
          System.debug(e.getStacktraceString());
        }
    }
}

 
My Goal:
I want to display a Knowledge Article selected from the Trending Articles list on the Home page or the Article Detail page in the Help Center Communities template.

The reason for this is that there is no simple way to display only the desired fields for a Knowledge Article. The Page Layout limitations causes undesirable fields to be display in the communities site (as many others attest with the same issue).

A Lightning Web Component will give me the control I am looking for, so I can display only the standard and custom fields I want to see.

Given this:
I understand that the Knowledge__kav object will let me access meta-data, while the KnowledgeArticleVersion object will allow me to get the Published Version object field data. I don't know how to access these together in an LWC. I have almost been able to do this using aan Apex class that returns the results of a SOQL query, but I only get the same record over an over again - its not reactive.

Realizing the Knowledge object is a strange animal, How can I achieve the above goal using a Lightning Web Component? I'm looking for the best practice for achieving my goal above?

Has anyone else done this using a LWC?

If someone can provide guidance on this, it would be most helpful.

There is no documentation or examples regarding the use of LWC to access the Knowledge object. All of them are simple Accounts or Contacts, and these standard objects do not work the same way as Knowledge objects.

I have been able to achieve (sort of) the above with an Aura component, but I feel like I should be able to do this with LWC.

In my prior attempts, I can use LWC code for Accounts or Contacts sucessfully, but whe n modified for Knowledge, it displays nothing.  I'm working with Salesforce support, but even they appear to be stymied by this.

Cna anyone provide some guidance?