• Gracie Marsh
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
I have updated SFDX.I need to install local dev server . Its getting failed ad got error message 
'Failed to setup Red Hat XML extension
Activating extension 'redhat.vscode-xml' failed: Connection to server got closed. Server will not be restarted..
Starting SFDX: Start Local Development Server'
How to preview LWC component locally. Thanks in advance.
 
Hi, I'm new to apex development and would like some help implementing the apex class!

1 - Create an apex class that updates the ProjectProgress__c field of the account object to true. 2 - Create a trigger that will trigger the APEX class of item 1 only when the status of a project changes to "In Progress".
  • May 25, 2022
  • Like
  • 0

Hi,
 
I would like to enable for ClickJack Protection for Visualforce Pages with standard headers and with headers disabled in our massive org. Is there any way to find out which Visualforce pages will be affected if I turn these two checkboxes on?   Thanks in advance.

Clickjack Settings

Hello,
I had a scenario where When user creates a Lead we need to first check that Is this an Existing Lead or not.Based on the data on New Lead record page.
If that data matches with the existing record then just update the record based on the field values that are provided and DO NOT CREATE THE NEW LEAD.
If that data does not matches with the existing records then just CREATE NEW LEAD
 
trigger LeadTrigg on Lead (before insert){
    switch on Trigger.operationType {
        when  Before_Insert{
            Set<String> leadFname = new Set<String>();
            for(Lead l : trigger.new){
                leadFname.add(l.firstname);
            }
            if(leadFname.size()>0 && leadFname != null){
                List<Lead> leadList = [Select id, firstname,email from Lead where firstname IN:leadFname];
                Map<String ,Lead> mapNameWiseAccount = new Map<String,Lead>();
                For(Lead le: leadList)
                {
                    mapNameWiseAccount.put(le.firstname ,le);
                }
                
                For(Lead le : trigger.new)
                {
                    if(mapNameWiseAccount.containsKey(le.firstname))
                    {
                        if(le.email != null){
                            leadList[0].email = le.email;
                            le.Id = leadList[0].id ;
                            update leadList;
                            
                        }
                    }
                }
                
            }
            
            
            
        }
        
    }
}

SO from the code its updating the email field values for an existing recoord but at the same time its creating a new record as well and i needed to restrict the creation of a new record .
Any Suggestion would be helpfull!!!