• hemant037
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies

Hi I have very critical issue anyone here to help me Pl..

 

How to check whether the email id  entered by user is containing Org's Domain or not ..?

 

Hi Every1,

 

I know many of you might seen this error before.

 

Failure Message: "System.ListException: List index out of bounds: 0", Failure Stack Trace: "Class.UserGroupTest.testuseradd: line 22, column 1"

 

Can someone help me resolve this perticular error. 

 

 

 

@istest
class UserGroupTest {

static testmethod void testuseradd(){

    test.starttest();
    List<Account> a= [Select Id From Account Where Name LIKE 'ABC%' Limit 1];

    List<Contact> c1 = [Select Id From Contact Where AccountId=:a[0].Id];
    
    List<Profile> p = [Select Id From Profile Where Name='** Custom: Portal: XYZ Partner'];
    
    if (p.size() > 0) {
        User u = new User(Username='test@teest.org',
         LastName='My Test',
          Alias='mmtt',
           CommunityNickname='tt11',
            TimeZoneSidKey='America/Los_Angeles',
             LocaleSidKey='en_US',
              EmailEncodingKey='UTF-8',
               LanguageLocaleKey='en_US',
               IsActive=true,
                ContactId=c1[0].Id, ProfileId=p[0].Id, email='test@teest.org');
        insert u;
    }
    test.stoptest();
    
    }
}

  • January 04, 2013
  • Like
  • 0

Hey guys,

I am trying to download the records that I have in Visualforce page to excel. I am able to download the file in all other browsers except IE8. I do not want to download the whole VF page. I want to download the records that are in the VF page. Basically, the VF page has excel icon, which when clicked should download the records in excel format. I have tried using cache="true" and contenttype="application/vnd.ms-excel#filename.xls" but this downloads the whole VF page at the time of loading. I want to be able to download the records at the click of the icon instead. Any kind of help is appreciated.

Thanks!

Hi I have very critical issue anyone here to help me Pl..

 

How to check whether the email id  entered by user is containing Org's Domain or not ..?