• saurabh sharma
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
I have to create a soql query on accounts object, to get the records with same account name.
My apex class is 
public class AlternateNamecl {
public Id URLId = System.currentPagereference().getParameters().get('id');
sobjecttype gettingWhatIDType ;
public string sUrl {get;set;}
    public AlternateNamecl(ApexPages.StandardController controller) {
    if(URLId != null){
      gettingWhatIDType = URLId.getSObjectType();
      String sEncodeID = EncodingUtil.base64Encode(blob.valueof(URLId+'-713ABP-XSH48-37VPK3J'));
      if(gettingWhatIDType == PreEmploy_Case__c.sObjectType){
        sUrl = Salesforcecl.GetSidesDotNetUrl() + 'AlternateName.aspx?ci='+sEncodeID ;
      }
      else{
      sUrl = Salesforcecl.GetSidesDotNetUrl() + 'AlternateName.aspx?oi='+sEncodeID ;
      }
    }
  }
}

And my test class is 
@isTest
public class AlternateNamecl_Test{
  static void testPageMethods() {
    Alternate_Names__c an = new Alternate_Names__c();
    insert an;
    PageReference pRef = Page.CaseAlternateName;
         pRef.getParameters().put('id', an.Id);
         Test.setCurrentPage(pRef);
         Test.startTest();
    ApexPages.StandardController controller = new ApexPages.StandardController(an);
    AlternateNamecl oAdd = new AlternateNamecl(controller);
    Test.stopTest();
  }
}

 
i am getting wrong query string sfdc.tabName=01r80000000YVBk
I have to create a soql query on accounts object, to get the records with same account name.
i am getting wrong query string sfdc.tabName=01r80000000YVBk