• Richa Upadhyay 29
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi,
I have a validation rule that restricts the event creation, but it should allow the event creation if this is coming from outlook. So basically, I can't create an event on salesforce but should be able to create via outlook. (Buring Issue)

Thanks in advance.
Hi Folks,

Foe the testMethod: I need to use and access contact data based on the RecordType. I need to acess it Dynamically, i.e., using developerName. Please help if I need to make any chages.With current code I am getting Exception: System.ListException: List index out of bounds. Please help me fixing this. How exactly I should create:  recordtypeid=rlist[3].id

Thanks in advance

list<RecordType> rList = [Select id 
                                            From RecordType 
                                            Where sObjectType = 'Contact'and RecordType.Name = 'developerName'];
                                         
      
            Contact c1, c2, c3, c4, c5;
            c1 = TestUtils.createContact(new Contact(title = 'CEO', Salutation = 'Mr.', Lastname='Contact 1', AccountId=ac1.id, Email='test1@test.com', recordtypeid=rlist[3].id));
            c2 = TestUtils.createContact(new Contact(title = 'CEO', Salutation = 'Mr.', Lastname='Contact 1', AccountId=ac1.id, Email='test2@test.com', recordtypeid=rlist[3].id));
Hi,
I have a validation rule that restricts the event creation, but it should allow the event creation if this is coming from outlook. So basically, I can't create an event on salesforce but should be able to create via outlook. (Buring Issue)

Thanks in advance.