• KPGUPTA
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 26
    Replies

Any guidance would be much appreciated.

I'm trying to extract records from Ideas, where a custom field is populated.

i.e. I'm wanting to do an equivalent of SQLs  WHERE Body like:+SearchText+''

The field is a  Text Area.

 

I've tried WHERE field='' and various other things, but Data Loader tells me the field can't be filtered on ...Am I just getting syntax wrong or can I really not filter on a text area field? That seems odd so guessing my syntax is duff.

hi,

actualy i have a code wich do searching on idea and discussion bt the prob is it shows only 5 results and i want to show min 10 resuts with pagination .

can anybody help me regarding this. APex code...

public Integer resultSize {get {return (results==null || results.size()==0)?0:results.size();} set;}        public String searchText {get {         return ApexPages.currentPage().getParameters().get('searchText') != null ?                 ApexPages.currentPage().getParameters().get('searchText') : '';} set;}        public MarketoSearchController() {        numResults = 10;        String pg = ApexPages.currentPage().getParameters().get('pg');        pageNum = pg == null ? 1 : Integer.valueOf(pg);        searchType = ApexPages.currentPage().getParameters().get('searchType');        getVideos();    }        public PageReference newPage() {        pageNum += 1;        return null;    }        public PageReference doSearch() {            pageNum = 1;        PageReference p = Page.MarketoSearchResults;        p.getParameters().put('searchText', searchText);        p.getParameters().put('searchType', searchType);        return p;    }        public void refresh(Boolean requery) {                   results = new List<SearchResult>();                if (setCon != null) {                        if (searchType == 'Ideas') {                for (Idea i : (List<Idea>) setCon.getRecords()) {                    results.add(new SearchResult(i.id,i.body,i.title,i.categories,                                i.lastmodifieddate!=null?i.lastmodifieddate:i.createddate));                }            }                        else if (searchType == 'Discussion') {                for (Question q2 : (List<Question>) setCon.getRecords()) {                    results.add(new SearchResult(q2.id,q2.body,q2.title,null,                        q2.lastmodifieddate!=null?q2.lastmodifieddate:q2.createddate));                }            }        }    }        public PageReference searchResults() {                if (searchType == null) {            String sType = ApexPages.currentPage().getParameters().get('searchType');            searchType = sType != null ? sType : 'Discussion';        }        searchText = ApexPages.currentPage().getParameters().get('searchText');        debugVar = 'Search type '+ ApexPages.currentPage().getParameters().get('searchType');        if (searchText == null) {                        if (!context.inSearch) {                searchText = 'Search '  + MarketoUserContext.getContext().currentSection + '...';            }            else {                searchText = 'Refine Your Search...';            }        }            results = new List<SearchResult>();           if (searchType == 'Ideas') {            Id[] similarIds = Ideas.findSimilar(new Idea(title=searchText, Body=searchText));            if (similarIds != null && similarIds.size() > 0) {                                setCon = new ApexPages.StandardSetController([select id, title, body, categories, createddate, lastmodifieddate from                                     idea where id in :similarIds /*order by lastModifieddate desc*/]);                System.debug('setCon-->'+ setCon);                                    setCon.setPageSize(numResults);            }        }        else if (searchType == 'Discussion') {                        Question q = new Question();            Id[] similarIds = Answers.findSimilar(new Question(title=searchText, Body=searchText));            if (similarIds != null && similarIds.size() > 0) {                                setCon = new ApexPages.StandardSetController([select id, title, body, createddate, lastmodifieddate from                                     question where id in :similarIds /*order by lastModifieddate desc*/]);                                                    setCon.setPageSize(numResults);             }        }                        refresh(true);                return null;    }    

hello,

i want to show min 10 results in searching results bt my code only show me 5 i also need apgination in this. so can any body pls help me 4 dis..??

 

my code is...

   public Integer resultSize {get {return (results==null || results.size()==0)?0:results.size();} set;}     

  public String searchText {get {         

return ApexPages.currentPage().getParameters().get('searchText') != null ?ApexPages.currentPage().getParameters().get('searchText') : '';

}

set;}       

public SearchController() {       

numResults = 10;       

String pg = ApexPages.currentPage().getParameters().get('pg');       

pageNum = pg == null ? 1 : Integer.valueOf(pg);       

searchType = ApexPages.currentPage().getParameters().get('searchType');       

getVideos();    }       

public PageReference newPage() {       

pageNum += 1;        return null;    }       

public PageReference doSearch() {            pageNum = 1;        PageReference p = Page.MarketoSearchResults;        p.getParameters().put('searchText', searchText);        p.getParameters().put('searchType', searchType);        return p;    }        public void refresh(Boolean requery) {                   results = new List<SearchResult>();                if (setCon != null) {                        if (searchType == 'Ideas') {                for (Idea i : (List<Idea>) setCon.getRecords()) {                    results.add(new SearchResult(i.id,i.body,i.title,i.categories,                                i.lastmodifieddate!=null?i.lastmodifieddate:i.createddate));                }            }                        else if (searchType == 'Discussion') {                for (Question q2 : (List<Question>) setCon.getRecords()) {                    results.add(new SearchResult(q2.id,q2.body,q2.title,null,                        q2.lastmodifieddate!=null?q2.lastmodifieddate:q2.createddate));                }            }        }    }        public PageReference searchResults() {                if (searchType == null) {            String sType = ApexPages.currentPage().getParameters().get('searchType');            searchType = sType != null ? sType : 'Discussion';        }        searchText = ApexPages.currentPage().getParameters().get('searchText');        debugVar = 'Search type '+ ApexPages.currentPage().getParameters().get('searchType');        if (searchText == null) {                        if (!context.inSearch) {                searchText = 'Search '  + MarketoUserContext.getContext().currentSection + '...';            }            else {                searchText = 'Refine Your Search...';            }        }            results = new List<SearchResult>();           if (searchType == 'Ideas') {            Id[] similarIds = Ideas.findSimilar(new Idea(title=searchText, Body=searchText));            if (similarIds != null && similarIds.size() > 0) {                                setCon = new ApexPages.StandardSetController([select id, title, body, categories, createddate, lastmodifieddate from                                     idea where id in :similarIds /*order by lastModifieddate desc*/]);                System.debug('setCon-->'+ setCon);                                    setCon.setPageSize(numResults);            }        }        else if (searchType == 'Discussion') {                        Question q = new Question();            Id[] similarIds = Answers.findSimilar(new Question(title=searchText, Body=searchText));            if (similarIds != null && similarIds.size() > 0) {                                setCon = new ApexPages.StandardSetController([select id, title, body, createddate, lastmodifieddate from                                     question where id in :similarIds /*order by lastModifieddate desc*/]);                                                    setCon.setPageSize(numResults);             }        }                        refresh(true);                return null;    }        public String currentSection { get { return MarketoUserContext.getContext().currentSection; } }

HI Everyone,

 

Actualy i want to save the records of selcted checkboxes in visula force page.. can anybody suggest me how to do this..

 

Select          Name      Email

Checkbox 

 

I want to save the selected records

Hey,

Can anybody please help me in this. actualy i want 2 integrate my public website with salesforce.com. I dn't have any idea can anybody help me plsssssss its urgent.....

 

Thanx

HELLO ,

Actualy i am creating a examination setup. in that i have to save the marks of the student class wise. i have three objects student profile in which student name and student marks filed there , subject in which subjects names are there and current one is examination setup in which m fetching the student name and subject name. i want to save student marks 

 

studentname/subject      sub1                                    sub2                              sub3

studentname              inputfield(marks)        inputfield(marks)          inputfield(marks)

 

i make this thing but i got a problem while saving this 

so can any body please help me regarding tihis????

hello 

Can anybody help me regarding this topic..

actualy i want to dispaly my record in matrix form and want to save this... i do the displaying part but i have a problem while saving.

my code  is

=======================================apex classs============================

 

public class ExaminationSetup 
{
  
  
    public void go()
    {
        citylist.clear();
        options.clear();
        activitylist.clear();
        stuMarks.clear();
        try
        {               
            class1 = examMarks.Class1__c;
            section = examMarks.Examination_Type__c;
            date1= examMarks.Date__c;
            
                examdetail = [Select ID, Student_Name__c FROM Examination_Setup__c];
                subjectlist =[SELECT SubjectId__r.Name,ClassId__c,Marks__c FROM SubjectClassRole__c WHERE (ClassId__c =:class1) AND (SubjectId__r.Name<>NULL)];
                if(class1!=null)
                { 
                    citylist = [Select Id,Name, Student_Name__c,Class_new__c FROM Student_Profile__c WHERE (Class_new__c=:class1) ORDER BY Student_Name__c ASC];
                    for(Student_Profile__c sku:citylist)
                    {
                        Examination_Setup__c sp1=new Examination_Setup__c();
                        sp1.Student_Name__c=sku.Name + ' ' + sku.Student_Name__c;
                        sp1.StudentID__c=sku.Name;
                        activitylist.add(sp1);
                    } 
                    for(SubjectClassRole__c subject : subjectlist)
                    {
                        Examination_Setup__c subjectdata=new Examination_Setup__c();
                        subjectdata.Subject__c=subject.SubjectId__r.Name;
                        subjectdata.Marks__c=subject.Marks__c;
                        subjectdata.Class1__c=subject.ClassId__c;
                        subjectdata.Student_Name__c=citylist[0].Student_Name__c;
                        system.debug('jawakaan de marksssssssssss' + subjectdata.Student_Name__c);
                        stuMarks.add(subjectdata);
                   }
               }
            }      
              public List<SelectOption> getactivitynames()    
              {        
                  return options;    
              }
              public List<Examination_Setup__c> getRecords() 
              {   
                  return activitylist;
              }
              public List<Examination_Setup__c> getSubjects() 
              {   
                  return stuMarks; 
              }
              public void setActivity(String activity)     
              {        
                  this.activity = activity;        
                  String section1=this.activity;
              }
              public String getActivity()     
              {        
                  return activity;    
              } 
 
        
         public PageReference save()
         {
         try  
         {  
            saveclass=act.Class1__c;
            saveexam=act.Examination_Type__c;
           
            insert stuMarks;
        }         
       
    }
        
}

 

 

 

=====================Visual Force page============================================

 

<table border="1" align="center">

 

    <tr>

       <td>

 

        </td>

        <apex:repeat value="{!Subjects}" id="repeat1" var="item">

        <td>

            <center><b><apex:outputField value="{!item.Subject__c}" id="theValue"/></b></center>

        </td>

        </apex:repeat>

    </tr>

    <apex:repeat value="{!Records}" id="repeat2" var="pitem">

    <tr>

        <td><center><b><apex:outputField value="{!pitem.Student_Name__c}" id="theValue"/></b></center></td>

 

        <apex:repeat value="{!Subjects}" id="repeat3" var="item">

        <td>

            <center><b><apex:inputField value="{!item.Marks__c}" id="theValue"/></b></center>

        </td>

         </apex:repeat>

     </tr>

      </apex:repeat>

 

 

</table>    

 

My objects are student profile from which i fetch student names, 2nd object is subject from where i fetch subject names and my current object is examination setup . 

 

Student name/subjects                         sub1                    sub2                           sub3..........

sname1                                      inputfield(marks)      inputfield(marks)    inputfield(marks)

sname2                                     inputfield(marks)        inputfield(marks)   inputfield(marks)

 

 

this thing which i cant do is i dnt knw how to locate the marks with suject and sname while saving 

 

 

please send me the correct code for this.....

 

 

  hello,
Actually i want to create a result document. in which i have to make a grid structure like 
student name/subjects            sub1                  sub2                       sub3            
studentname1                  text field(marks)       text field(marks)    text field(marks)
studentname2                 text field(marks)       text field(marks)     text field(marks)
student name3              text field(marks)        text field(marks)     text field(marks)
.
.
.


Now here subjects are coming from one custom object and student names are coming from other objects and marks will be enter by current object.

If any body know how to implement this plsss reply soon i need this urgently....

 

Any guidance would be much appreciated.

I'm trying to extract records from Ideas, where a custom field is populated.

i.e. I'm wanting to do an equivalent of SQLs  WHERE Body like:+SearchText+''

The field is a  Text Area.

 

I've tried WHERE field='' and various other things, but Data Loader tells me the field can't be filtered on ...Am I just getting syntax wrong or can I really not filter on a text area field? That seems odd so guessing my syntax is duff.

hi everyone!!

I am creating a test method I m new to this so can anybody please help me regarding this. my apex code is:

public PageReference redirectToTutorial(){
        if(ApexPages.currentPage().getParameters().get('articleName') != null){
            return null;
        }
        DataCategoryHelper helper = DataCategoryHelper.getHelper('KnowledgeArticleVersion');
        String currentType;
        String currentArticleCategory;
        currentType = ApexPages.currentPage().getParameters().get('type');
        system.debug('====currentType======'+currentType);
        PageReference pg = null;
        Tutorial__kav currentArticle;
        List<Tutorial__kav> articleList = [select  URLName, id, Tutorial_Article_Text__c,(select DataCategoryGroupName, DataCategoryName From DataCategorySelections) from Tutorial__kav where knowledgeArticleId=:ApexPages.currentPage().getParameters().get('Id') and publishstatus='Online'];
        if(articleList != null && articleList.size() > 0){
            currentArticle = articleList.get(0);
            if(currentArticle.DataCategorySelections.size() > 0){
                currentArticleCategory = currentArticle.DataCategorySelections.get(0).DataCategoryName;
            }
        }
        pg = Page.MarketoTutorial;
        pg.getParameters().put('Id', ApexPages.currentPage().getParameters().get('Id'));
        pg.getParameters().put('articleName', currentArticle.URLName);
        pg.getParameters().put('tutorialName', currentArticleCategory);
        system.debug('=================='+pg);
        return pg.setRedirect(true);
    }
    

  • August 11, 2011
  • Like
  • 0

hello,

i want to show min 10 results in searching results bt my code only show me 5 i also need apgination in this. so can any body pls help me 4 dis..??

 

my code is...

   public Integer resultSize {get {return (results==null || results.size()==0)?0:results.size();} set;}     

  public String searchText {get {         

return ApexPages.currentPage().getParameters().get('searchText') != null ?ApexPages.currentPage().getParameters().get('searchText') : '';

}

set;}       

public SearchController() {       

numResults = 10;       

String pg = ApexPages.currentPage().getParameters().get('pg');       

pageNum = pg == null ? 1 : Integer.valueOf(pg);       

searchType = ApexPages.currentPage().getParameters().get('searchType');       

getVideos();    }       

public PageReference newPage() {       

pageNum += 1;        return null;    }       

public PageReference doSearch() {            pageNum = 1;        PageReference p = Page.MarketoSearchResults;        p.getParameters().put('searchText', searchText);        p.getParameters().put('searchType', searchType);        return p;    }        public void refresh(Boolean requery) {                   results = new List<SearchResult>();                if (setCon != null) {                        if (searchType == 'Ideas') {                for (Idea i : (List<Idea>) setCon.getRecords()) {                    results.add(new SearchResult(i.id,i.body,i.title,i.categories,                                i.lastmodifieddate!=null?i.lastmodifieddate:i.createddate));                }            }                        else if (searchType == 'Discussion') {                for (Question q2 : (List<Question>) setCon.getRecords()) {                    results.add(new SearchResult(q2.id,q2.body,q2.title,null,                        q2.lastmodifieddate!=null?q2.lastmodifieddate:q2.createddate));                }            }        }    }        public PageReference searchResults() {                if (searchType == null) {            String sType = ApexPages.currentPage().getParameters().get('searchType');            searchType = sType != null ? sType : 'Discussion';        }        searchText = ApexPages.currentPage().getParameters().get('searchText');        debugVar = 'Search type '+ ApexPages.currentPage().getParameters().get('searchType');        if (searchText == null) {                        if (!context.inSearch) {                searchText = 'Search '  + MarketoUserContext.getContext().currentSection + '...';            }            else {                searchText = 'Refine Your Search...';            }        }            results = new List<SearchResult>();           if (searchType == 'Ideas') {            Id[] similarIds = Ideas.findSimilar(new Idea(title=searchText, Body=searchText));            if (similarIds != null && similarIds.size() > 0) {                                setCon = new ApexPages.StandardSetController([select id, title, body, categories, createddate, lastmodifieddate from                                     idea where id in :similarIds /*order by lastModifieddate desc*/]);                System.debug('setCon-->'+ setCon);                                    setCon.setPageSize(numResults);            }        }        else if (searchType == 'Discussion') {                        Question q = new Question();            Id[] similarIds = Answers.findSimilar(new Question(title=searchText, Body=searchText));            if (similarIds != null && similarIds.size() > 0) {                                setCon = new ApexPages.StandardSetController([select id, title, body, createddate, lastmodifieddate from                                     question where id in :similarIds /*order by lastModifieddate desc*/]);                                                    setCon.setPageSize(numResults);             }        }                        refresh(true);                return null;    }        public String currentSection { get { return MarketoUserContext.getContext().currentSection; } }

HI Everyone,

 

Actualy i want to save the records of selcted checkboxes in visula force page.. can anybody suggest me how to do this..

 

Select          Name      Email

Checkbox 

 

I want to save the selected records

Hey,

Can anybody please help me in this. actualy i want 2 integrate my public website with salesforce.com. I dn't have any idea can anybody help me plsssssss its urgent.....

 

Thanx

HELLO ,

Actualy i am creating a examination setup. in that i have to save the marks of the student class wise. i have three objects student profile in which student name and student marks filed there , subject in which subjects names are there and current one is examination setup in which m fetching the student name and subject name. i want to save student marks 

 

studentname/subject      sub1                                    sub2                              sub3

studentname              inputfield(marks)        inputfield(marks)          inputfield(marks)

 

i make this thing but i got a problem while saving this 

so can any body please help me regarding tihis????

Hi,

are user ids unique across all salesforce.com prod orgs (with the exception of full sandbox copies)?

 

For example, if a new user is created in a sandbox, is the id of the new user unique across all users in salesforce.com production orgs?

 

Thanks.

  • January 13, 2011
  • Like
  • 0

Hi,

 

i have list button in CASE object which Open visualforce page and have enabled Display checkboxes for muli-record selection.

 

I want to make some javascript for this button or some code for page which:

 

1. show alert and block all controls on page with standard CASE Button controller so user must click BACK in navigation

 

OR

 

2. Show alert windows when user click on list view button and there is no selection and after this alert will be no redirect to VF page

 

 

How Can I do it?

I have a class with two methods.  The main method pulls data from the db and creates a list of Opportunities.  The PageReference method creates a document using a Page that pulls it's data from the main method.  It thens saves this PDF in the Documents folder and as an Attachment on the Opportunity. 

 

I have written test methods for both pieces of code but I'm stuck at 55% coverage.  I'm trying to figure out what I'm missing.  Thank you in advance.


 

    public class ProbeQuote {
        Schema.DescribeFieldResult F = Product2.Family.getDescribe();
        List<Schema.PicklistEntry> P = F.getPicklistValues();

        public Opportunity Probe { get; set; }

        public String pdfName;

        public ID id = ApexPages.CurrentPage().getParameters().get('id');

        public List<Opportunity> ProbeProducts = new List<Opportunity>();

        Integer Counter = 1;

        public ApexPages.StandardController controller;

        public ProbeQuote(ApexPages.StandardController stdController) {
            controller = stdController;
            //quoteid = stdController.getRecord().id;
            //ID id = '0068000000NyTHe';

            for (Schema.PicklistEntry fam:P){
            Integer i = 0;
            String FamilyLabel = fam.GetLabel();

            Probe = [SELECT o.Id, o.Name, o.Amount, o.ProductFamily__c, (SELECT op.Quantity, op.UnitPrice,
op.TotalPrice,op.PricebookEntry.Name, op.OpportunityId, op.PricebookEntry.ProductCode,
            op.PricebookEntry.Product2.Family, op.LineCount__c 
            FROM OpportunityLineItems op WHERE op.PricebookEntry.Product2.Family = :FamilyLabel)
            FROM Opportunity o where Id = :id];

            Probe.Amount = 0;
            Probe.ProductFamily__c = FamilyLabel;

            for(i=0;i<Probe.opportunityLineItems.size();i++) {
                Probe.Amount += Probe.opportunityLineItems[i].TotalPrice;  
                Probe.opportunityLineItems[i].LineCount__c = Counter;
                Counter++;
            }

            ProbeProducts.add(Probe);
            }
        }

        public List<Opportunity> getProbeProducts() {
            return ProbeProducts;
        }

        public PageReference attachQuote() {
            Opportunity Opp = [SELECT o.Id, o.Name, o.Amount, o.ProductFamily__c 
            FROM Opportunity o where Id = :id]; 

            pdfName = Opp.Name + '.pdf';

            /* Get the page definition */
            PageReference pdfPage = new PageReference( '/apex/ProbeQuote' );

            /* set the quote id on the page definition */
            pdfPage.getParameters().put('id',id);

            /* generate the pdf blob */
            Blob pdfBlob = pdfPage.getContent();

            /* create the attachment against the quote */
            Attachment a = new Attachment(parentId = id, name=pdfName, body = pdfBlob);

            /* insert the attachment */
            insert a;

            /* Now create document to show up in Documents Tab in Quotes Folder */

            Folder f = [SELECT Id, Name FROM Folder WHERE Name = 'Quotes'
            AND Type = 'Document'];

            Document d = new Document();

            d.Name = pdfName;

            //d.DeveloperName = pdfName;

            d.ContentType = 'application/pdf';

            d.Body = pdfBlob;

            d.FolderId = f.Id;

            insert d;


            /* send the user back to the quote detail page */
            return controller.view();
        }

        public static testMethod void testProbeQuote() {
            Id id;
            Opportunity testProbe;
            List<Opportunity> testProbeProducts = new List<Opportunity>();
            Integer Counter = 1;

            Schema.DescribeFieldResult F = Product2.Family.getDescribe();
            List<Schema.PicklistEntry> P = F.getPicklistValues();

            Opportunity testOppty = new opportunity (Name = 'Force Monkey 4x4',
            StageName = 'Prospect', Amount = 2000, CloseDate = System.today() );

            insert testOppty;

            id = testOppty.id;

            // Insert test Truck OpportunityLineItem

            OpportunityLineItem testOLI = new OpportunityLineItem (Quantity = 5,
            UnitPrice = 100, OpportunityId = testOppty.id, PricebookEntryId = '01u80000002XFfKAAW');

            insert testOLI;

            for (Schema.PicklistEntry fam:P){
                Integer i = 0;
                String FamilyLabel = fam.GetLabel();

                testProbe = [SELECT o.Id, o.Name, o.Amount, o.ProductFamily__c, (SELECT op.Quantity, op.UnitPrice, op.TotalPrice,op.PricebookEntry.Name, op.OpportunityId, op.PricebookEntry.ProductCode, op.PricebookEntry.Product2.Family, op.LineCount__c 
            FROM OpportunityLineItems op WHERE op.PricebookEntry.Product2.Family = :FamilyLabel)
            FROM Opportunity o where Id = :id];
                testProbe.Amount = 0;
                testProbe.ProductFamily__c = FamilyLabel;

                for(i=0;i<testProbe.opportunityLineItems.size();i++) {
                    testProbe.Amount += testProbe.opportunityLineItems[i].TotalPrice;  
                    testProbe.opportunityLineItems[i].LineCount__c = Counter;
                    Counter++;
                }

                testProbeProducts.add(testProbe);
            }


            PageReference pg = Page.yourVFpageName; Test.setCurrentPage(pg); ApexPages.currentPage().getParameters().put('id', testOppty.id);

            // Instantiate custom ProbeQuote controller

            //testProbeProducts.add(testOppty);

            System.assertEquals (testProbeProducts[0].Name, 'Force Monkey 4x4');

            ApexPages.StandardController stc = new ApexPages.StandardController(testOppty);
            ProbeQuote qe = new ProbeQuote(stc);
        }

        public static testMethod void  testattachQuote() {
            String pdfName;

            Opportunity testOppty = new opportunity (Name = 'Force Monkey 4x4',
            StageName = 'Prospect', Amount = 2000, CloseDate = System.today() );

            insert testOppty;

            ID id = testOppty.id;

            // Insert test Truck OpportunityLineItem

            OpportunityLineItem testOLI = new OpportunityLineItem (Quantity = 5,
            UnitPrice = 100, OpportunityId = testOppty.id, PricebookEntryId = '01u80000002XFfKAAW');

            insert testOLI;

            pdfName = testOppty.Name + '.pdf';

            /* Get the page definition */
            PageReference pdfPage = new PageReference( '/apex/ProbeQuote' );

            /* set the quote id on the page definition */
            pdfPage.getParameters().put('id',id);

            /* generate the pdf blob */
            Blob pdfBlob = pdfPage.getContent();

            /* create the attachment against the quote */
            Attachment a = new Attachment(parentId = id, name=pdfName, body = pdfBlob);

            /* insert the attachment */
            insert a;

            /* Now create document to show up in Documents Tab in Quotes Folder */

            Folder f = new Folder (Name = 'Quotes', Id = '00l80000001DJ2aAAG', Type = 'Document');

            System.assertEquals (f.Name, 'Quotes');

            Document d = new Document(Name = pdfName, ContentType = 'application/pdf',
            Body = pdfBlob, FolderId = f.Id);

            insert d;

            PageReference pg = Page.yourVFpageName; Test.setCurrentPage(pg); ApexPages.currentPage().getParameters().put('id', testOppty.id);

            // Instantiate custom ProbeQuote controller

            ApexPages.StandardController stc = new ApexPages.StandardController(testOppty);
            ProbeQuote qe = new ProbeQuote(stc);

        }

    }