• Nusha Ahmad
  • NEWBIE
  • 30 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 0
    Replies
What could be the reason that I am  unable to find other user in look up when I am trying to change the owner of account or any object ?
// Whenever a new Lead created create a corresponding contact with the same data.
public class Lead_Contact {
    
    public static void AfterInsert(List<Lead> leads){
        
        List<Contact> contacts= new List<Contact>();
        for(Lead l: leads){
             contact c = new Contact();
            c.LastName=l.LastName;
            c.Phone=l.Phone;
            c.Email=l.Email;
            c.FirstName=l.FirstName;
            c.AccountId=l.Id;
            contacts.add(c);
        }insert contacts;
    }

}
// trigger
trigger Lead_Contact on Lead (after insert) {
      Lead_Contact.AfterInsert(trigger.new);
}
Your attempt to delete Jim Rohn could not be completed because some opportunities in that account were closed-won. The opportunities that could not be deleted are shown below. If the following table is empty, it is because you do not have access to the records restricting the delete.

I need to know which access do i need on record to delete it.
If city__c is equal to hyd panCard, phone,email blank through error.
picklist_example cmp
<aura:component >
    <aura:attribute name="selected" type="string" default="1"/>
    <lightning:select name="select1" label="How many tickets" value="{!v.selected}"  onchange="{!c.show}">
        <option value="">choose one..</option>
        <option value="1">one</option>
        <option value="2">two</option>
        <option value="3">three</option>
        
    </lightning:select>
    <br/><br/>
    
    <aura:attribute name="options" type="list" default="[{'label':'java','value':'ocjp'}
                                                        {'label':'sfdc','value':'admin'}
                                                        {'label':'aws','value':'aws01'}]"/>
    <aura:attribute name="value" type="list" default="option1"/>
    
           <lightning:checkboxGroup name="Checkbox Group"
                                 label="certifications"
                                 options="{!v.options}"
                                 value="{!v.value}"
                                 onchange="{!c.handleChange}"/>
    
</aura:component>

controller
({
    show : function(component, event, helper) {
        var result=event.getParam('value');
        alert(result);
        
    },
    handleChange: function (component, event) {
        alert(event.getParam('value'));
    }
})
Application
<aura:application extends="force.slds" >
    <c:picklist_example/>
    
</aura:application>