• Sudhir Kumar Mehta
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies
Hey everyone, looking to see if anyone has been able to customize the New button on the Salesforce1 Recents Account's view (please see image below, screen #2) and launch the record types but with using the publisher layout pages? 

Currently when the New button is pressed, the record type shows up, but then goes straight into the full account fields to be inputted. 

Is their a way to only enter the minimum fields into an account record when the record type is selected? 

User-added image
I have created a new custom object and from  a custom profile I have selected/checked create,read,edit,delete. For some selected users on the same profile I want to give only read permission and only one app. I have created a Permission Set and only selected one app and disabled all the options on except read on the Permission Set. STill user on the permission set are able to see all the apps and edit and delete option the object.
i need to write a testclass for this trigger



trigger example5 on Lead (after insert) {
    Integer total;
    List<Contact> contacts=new List<Contact>();
    for(Lead l:Trigger.New){
        total=0;
        if(l.firstName!=null && l.firstname!='')
            total=total+10;
        if(l.phone!=null && l.phone!='')
            total=total+10;
        if(l.email!=null && l.email!='')
            total=total+10;
        if(total>=20){
            Contact c=new Contact();
            c.lastname=l.lastname;
            c.firstName=l.firstName;
            c.phone=l.phone;
            c.Email=l.email;
            c.ownerId=l.ownerId;
            contacts.add(c);
        }
    }
    insert contacts;
}
My trigger contains the following code :
  Map<String,Contact> cntMap=new Map<String,Contact>();
 list<contact> cnt=[select id,Email from contact where Email!=null AND Email IN: setEmailId];

and these are two conditions which are not covering :
1: if(cnt.size()>0)
    {
        for(integer i=0;i<cnt.size();i++)
        {
            cntMap.put(cnt[i].Email,cnt[i]);
        }
    }

2: if(cntMap.containsKey(contact.Email))
           {
                Contact oldCnt = cntMap.get(contact.Email);
                string Id;
                Id=oldCnt.Id;
                   if(contact.Id!=Id)   
                    contact.Email.addError('Duplicate Contact Email ID found  and the link for record is : ' + curUrl + '/' +Id);
           }


can any one tell me how to cover these lines in test class

Thanks,
Kiran
Hey everyone, looking to see if anyone has been able to customize the New button on the Salesforce1 Recents Account's view (please see image below, screen #2) and launch the record types but with using the publisher layout pages? 

Currently when the New button is pressed, the record type shows up, but then goes straight into the full account fields to be inputted. 

Is their a way to only enter the minimum fields into an account record when the record type is selected? 

User-added image
Hi Guys,

I have a small doubt with regards to the Required Check box.

I have created a picklist field without making it required now I want that field to required whiere I am unable to see the option of Required check box I know that I can make it using Validation Rules and why it is possible with the Test or other fields.Can anyone explain me please.

RegardsUser-added imageUser-added image
I have created a new custom object and from  a custom profile I have selected/checked create,read,edit,delete. For some selected users on the same profile I want to give only read permission and only one app. I have created a Permission Set and only selected one app and disabled all the options on except read on the Permission Set. STill user on the permission set are able to see all the apps and edit and delete option the object.