• kk_m
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies


Hi all,,

I create wrapper class pageblock table with checkbox with checkAll checkbox with pagination ..but it is not working for checkbox with checkAll with pagination functionality

 

 

thanks in advance..

  • October 31, 2012
  • Like
  • 0

Hi All

 

 

 

In string methods there is method called substringBetween is not working any can help to solve that one

 

ex:

 

string s1 =''xYellowY';

string s2 = s1.substringBetween('x','y');

 

thanks in advance

  • October 10, 2012
  • Like
  • 0

Hi All

 

 

 

In string methods there is method called substringBetween is not working any can help to solve that one

 

ex:

 

string s1 =''xYellowY';

string s2 = s1.substringBetween('x','y');

 

 

 

 
  • October 10, 2012
  • Like
  • 0

Hi All,

 

I wrote two class One is Create envelop it is webservice for restful (POST) sending data to third party  application

2nd one is for controller extension for catch that response display it on visualforce page.

 

I am trying to write a test class for the controller extension but i got this error

 

 

System.DmlException: Insert failed. First exception on row 0; first error: ENTITY_IS_DELETED, entity is deleted: []

 

Class.Test_YesMailExtention.testYesMailExtention: line 23, column 1

 

 

my class is

 

 

public class YesMailExtention {
    private final Yes_Mail_Master__c master { get ; set; }
    ApexPages.StandardController controller{ get; set ; }
    public String ActiveTab {get; set;} { ActiveTab = '1';}
    public string campaignId { get; set ; }
    public string strMsg { get ; set ; }  
    //public string Existedlist { get; set; }
    public YesMailExtention (ApexPages.StandardController controller) {
        
        campaignId= apexpages.currentpage().getparameters().get('cid');
        
                 
              if ( campaignId <> null) {
                  
                      campaign CampaignRow=[select Id,Name, Campaign_Members__c from campaign where id = '70190000000LJbr'];
                      
                      strMsg = 'Total Campaign Members add to this list is '+ CampaignRow.campaign_members__c ;
                      
                      this.controller = controller;
                      
                      this.master = (Yes_Mail_Master__c)controller.getRecord();
                      
                      this.master.Campaign__c = CampaignId;
           
          } else {

            
                    this.controller = controller;
                    
                    this.master = (Yes_Mail_Master__c)controller.getRecord();
        }
    }
    
      public PageReference nextTab(){
     // this.ActiveTab = 'Content'; 
      this.ActiveTab = String.valueOf(Integer.valueOf(ActiveTab)+1); 
      return null;
     }
     
    public PageReference saveMaster() {
      
       String mmid = CreateMasterEnvelope.postEnvelope(master);
       system.debug('Create envop mmid==========='+ mmid);
       master.MMID__c = mmid;
       //upsert master;
       controller.save();
       PageReference viewPage = this.controller.view();
       viewPage.setRedirect(true);
       return viewPage ;
     }



my testclass code



@isTest
Private class Test_YesMailExtention {

static testMethod void testYesMailExtention() {

//PageReference pageRef = Page.yesmailsend3;
PageReference pageRef =new PageReference('/apex/yesmailsend3?cid=70190000000EBYz');
Test.setCurrentPageReference(pageRef);

Yes_Mail_Master__c lst_yes = new Yes_Mail_Master__c (
       Name='pk_test_1001',
       Description__c='pk_test_1001',
       Subject__c='pk_test_1001',
       Content__c='pk_test_1001',
       Friendly_From__c='pk_test_1001',
       From_Domain__c='email@division1.wstest.com',
       //mmid__c = '123456',
       Campaign__c='70190000000EC3u',
       Delivery_Type__c='Auto-Detect delivery',
       Encoding__c= 'Any Country (UTF-8)',
       Division__c='DivisionOne');
         
        insert lst_yes;
      
       ApexPages.StandardController sc = new ApexPages.standardController(lst_yes);
        YesMailExtention myPageCon = new YesMailExtention (sc);
        
          
        myPageCon.campaignId ='70190000000EC3u';
         myPageCon.strMsg='Total campaign Members is';
          myPageCon.campaignId ='';
        myPageCon.ActiveTab ='1';
   
        ApexPages.StandardController controller=sc;
            myPageCon.controller = sc ;
            myPageCon.SetController(sc);
      
        
        myPageCon.saveMaster();
      
        }
         
        }




can any one can solve this
thanks in advance





 

 





  • September 14, 2012
  • Like
  • 0