• anuj huria
  • NEWBIE
  • 30 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 6
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 35
    Replies

Hi guys,

I just want to ask why we use visualforce component page on dasboard component,what is the use case of this.

 

hi guys im new for writing test class

heelp me writting test class for this class

public  class GetImageHandler {

    public GetImageHandler() {

    }
    
   Contact c= new Contact(); 
     public void save(){
    
      c.LastName='hemant';
     c.Email='jaguu@juglee.com';
     insert c;
     Send();
     }

     public void de(){
    
      delete c;
     }

    public final Opportunity Op;

    Opportunity opp = new Opportunity();
    
    public Id parentId;
    
         public GetImageHandler(ApexPages.StandardController controller) {
    
                parentId= ApexPages.currentPage().getParameters().get('id');
                
                opp = [Select Name,Id,Primary_Contact__r.Email from Opportunity where Id=: parentId];
    
    }
   public PageReference savePdf() {

    PageReference pdf = Page.quote;
    // add parent id to the parameters for standardcontroller
    pdf.getParameters().put('id',parentId);

    // create the new attachment
    Attachment attach = new Attachment();

    // the contents of the attachment from the pdf
    Blob body;

    try {

        // returns the output of the page as a PDF
        body = pdf.getContent();

    // need to pass unit test -- current bug    
    } catch (VisualforceException e) {
        body = Blob.valueOf('Some Text');
    }

    attach.Body = body;
    // add the user entered name
    attach.Name = 'Quote_'+opp.Name+'_'+System.Today().year()+'.pdf';
    attach.IsPrivate = false;
    // attach the pdf to the account
    attach.ParentId = parentId;
    insert attach;
   save();
    // send the user to the account to view results
    return new PageReference('https://c.cs14.visual.force.com/'+parentId);

  }
    
   public PageReference saveExl() {

    PageReference pdf = Page.quoteexl;
    // add parent id to the parameters for standardcontroller
    pdf.getParameters().put('id',parentId);

    // create the new attachment
    Attachment attach = new Attachment();

    // the contents of the attachment from the pdf
    Blob body;

    try {

        // returns the output of the page as a PDF
        body = pdf.getContent();

    // need to pass unit test -- current bug    
    } catch (VisualforceException e) {
        body = Blob.valueOf('Some Text');
    }

    attach.Body = body;
    // add the user entered name
    attach.Name = 'Quote_'+opp.Name+'_'+System.Today().year()+'.xls';
    attach.IsPrivate = false;
    // attach the pdf to the account
    attach.ParentId = parentId;
    insert attach;
    Save();
    // send the user to the account to view results
    return new PageReference('https://c.cs14.visual.force.com/'+parentId);

  }
  
 public PageReference send() {
                Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 
                String addresses;
                if (opp.Primary_Contact__r.Email!= null) {
                    addresses = opp.Primary_Contact__r.Email;
                
                }
                  email.setTargetObjectId(c.id);
                  email.setWhatId(Opp.id);
                  //email.setTemplateId('00X28000000QK5V');
                  email.setSubject('Revised Quote');
                  email.setToAddresses(new String[] { addresses });
               // email.setToAddress(addresses);
                  email.setPlainTextBody( 'Please Find Attachment');
        
                
                    
                     List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
                       // for (Attachment a : [select Name, Body, BodyLength from Attachment where ParentId = :opp.Id])
                     //   {
                        // Add to attachment file list
                        List<Attachment> a = [select Name, Body, BodyLength from Attachment where ParentId = :opp.Id Order by Createddate desc Limit 1];
                        Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();
                        efa.setFileName(a[0].Name);
                        efa.setBody(a[0].Body);
                        fileAttachments.add(efa);
                       // }
                        email.setFileAttachments(fileAttachments);
                      //Send email
                        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
       
         
                de();

                return new PageReference('https://c.cs14.visual.force.com/'+parentId);
            }
 
}

hi guys 

im using chart.js in vf page to show the opportunity on the basis of there stage
i want the different segments to be click able

 

here is my vf page

<apex:page controller="oppCharJS" >
    <head>
        <apex:includeScript value="{!URLFOR($Resource.charJs,'Chart.js-2.1.6/dist/Chart.bundle.js')}"/>
        <apex:includeScript value="{!URLFOR($Resource.charJs,'Chart.js-2.1.6/dist/Chart.bundle.min.js')}"/>
        <apex:includeScript value="{!URLFOR($Resource.charJs,'Chart.js-2.1.6/dist/Chart.js')}"/>
        <apex:includeScript value="{!URLFOR($Resource.charJs,'Chart.js-2.1.6/dist/Chart.min.js')}"/>
    </head>
    <canvas id="myChart" width="500" height="200"></canvas>
    <script>
     var arr=new Array();
     <apex:repeat value="{!label}" var="l">
         arr.push("{!l}");
     </apex:repeat>
      
     var arr1=new Array();
     <apex:repeat value="{!data}" var="l">
         arr1.push("{!l}");
     </apex:repeat>
     var arr2= new Array();
     var arr3= new Array();
     for(var i=0;i<arr.length;i++)
     {
     var w,x,y,z;  
     w=parseInt(Math.random()*255);
     x=parseInt(Math.random()*255);
     y=parseInt(Math.random()*255);
     z=Math.random();
     
     arr2.push('rgba('+w+','+x+','+y+','+z+')');
     arr3.push('rgba('+w+','+x+','+y+',1)');
     }
     var ctx = document.getElementById("myChart");
    var myChart = new Chart(ctx, {
        type: 'pie',
        data: {
            labels:arr,
            datasets: [{
                label: '# of Votes',
                data: arr1,
                backgroundColor: arr2,
                borderColor: arr3,
                borderWidth: 1
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero:true
                    }
                }]
            }
        }
    });
    
    </script>
    
</apex:page>
 

here is my controller

 

public class oppCharJS 
{
    
    public list<string> label{get;set;}
    public list<integer> data{get;set;}
    
    public oppCharJS()
    {
        
         label=new list<string>();
         data= new list<integer>();      
        generateData();
    }
    
    public void generateData(){
   
   
    AggregateResult[] groupedResults  = [SELECT StageName, Count(Id) cnt FROM Opportunity group by StageName];

        for (AggregateResult ar : groupedResults)  
        {
             label.add((string)ar.get('StageName'));
             data.add((integer)ar.get('cnt'));
        }
        
    }
}

and this is the output im getting right now

User-added image
Hi Guys,
I was integrating Instagram  with Salesforce,and getting access_tokek in url like this

https://c.ap2.visual.force.com/apex/instaIntegration#access_token=6394********83e.**********8af6330377c35d316

i dont know how to get the access token attached with'#'

Thanks
hi guys im newbie in integration
 i have a requirement in vf page 

1) inputText to enter email
2) inputText to enter password
3) login button
by pressing the login button i should login in to my fb account

please tell me how can i achive this

=> if i create an account in my org,same account should be create in another org

suggest me some ideas and code if possible

controller


public class accToPick 
{

   

    
List<Account> acc;
public String val{get;set;}
 public List<cContact> ist{get;set;}
  public String index {get;set;}
  
  public String fname{get;set;}
  public String lname{get;set;}
  

    public accToPick()
    {
    acc= [SELECT id,name FROM Account];
    
    
    
    }
    
        
 
    
    public List<SelectOption> getAccounnames() 
    {
        List<SelectOption> accOptions= new List<SelectOption>();
        for(Account acc2:acc)
            {
            
            accOptions.add(new selectOption(acc2.id,acc2.name));
            }
        return accOptions;
    }
    

    public List<cContact> conload()
    {    
          ist= new List<cContact>();
        for(Contact a:[SELECT id,name,email from Contact where Account.Id=:val])
        {
            ist.add(new cContact(a));
        }
        
         return null;
    }
    
    public void addContact()
        {
        Contact lc=new Contact(FirstName=fname,LastName=lname,AccountId=val);
        
            try
            {
                insert lc;
            }
            
            catch(Exception e)
            {
                ApexPages.addMessages(e);
            }
            conload();
            fname='';
            lname='';
        }
     
     public void deletecon()
     {
      Contact c1=[select id from Contact where id=:index];
      delete c1;
      conload();
     }
     
     public PageReference sendmail()
     {
         List<Contact> selectedContacts = new List<Contact>();
        
            
              
           
            
         
         //System.debug(selected + 'abc');
        for(cContact cCon :ist) 
        {
        
            if(cCon.selected==true) 
            {
                selectedContacts.add(cCon.con);
                
            }
            
        }
        System.debug('These are the selected Contacts…');
        for(Contact con : selectedContacts) 
        {
            string conEmail = con.Email;
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
            String[] toAddresses = new String[] {conEmail};
            mail.setToAddresses(toAddresses);
            mail.setReplyTo('huria.99.anuj@gmail.com');
            mail.setSenderDisplayName('Salesforce Support');
            mail.setSubject('New Case Created : ' + case.Id);
            mail.setBccSender(false);
            mail.setUseSignature(false);
            mail.setPlainTextBody('Thank for Contacting');
            mail.setHtmlBody('Thank for Contacting');
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
        }
        return null;
     }
     
      public class cContact 
      {
        public Contact con {get; set;}
        public Boolean selected {get; set;}
        public cContact(Contact c)
        {
            con = c;
            selected = false;
        }
    }
    
    
}
controller

public class AddmultipleAccountsController {
Account account = new Account();
public list<Account> listAccount{ get; set; }

public AddmultipleAccountsController()
{
listAccount=new list<Account>();
listAccount.add(account);
}

Public void addAccount()
{
Account acc = new Account();
listAccount.add(acc);
}
public PageReference saveAccount() {
for(Integer i=0; i<listAccount.size(); i++)
{
insert listAccount;
}
return Page.addmore;
}
}

test class

@isTest
public class addmul_test 
{
    static testmethod void addtest()
    {
        AddmultipleAccountsController ar=new AddmultipleAccountsController();
        pagereference pf=Page.addmore;
        ar.addAccount();
       
       
        ar.saveAccount();       
        
        
       
        
        
    }
}
hi guys i created a vf page,in which im getting the customer's signature on canvas, and saving that page as pdf in the realted list of attachment,
but problem is that the signature is not visible in pdf look into my code 

vf page

<apex:page controller="upl1" SHowHeader="false" sidebar="false" standardStylesheets="false" >
    
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <apex:stylesheet value="{!URLFOR($Resource.bootstrap,'bootstrap-3.3.6-dist/css/bootstrap.min.css')}"/>
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"/>
    <apex:includeScript value="{!URLFOR($Resource.bootstrap,'bootstrap-3.3.6-dist/js/bootstrap.min.js')}"/>
    
    </head>
        

    <body>  
            <div class="well well-lg text-center"><h1>Invoice</h1></div>
        
            <apex:form id="pbform">
          <apex:pageMessages />
          <div class="container1">
           <h1 class="labelCol vfLabelColTextWrap ">Record Signature:</h1>
           <canvas id="signatureCanvas" height="100px" width="350px" style="border: 3px solid antiquewhite; border-radius: 8px;" ></canvas>
          </div><br/>
          
          <div style="margin-left: 41%;">
           <apex:commandButton value="Save Signature" onclick="saveSignature();return false;" styleClass="button1"/>&nbsp;&nbsp;&nbsp;
           <apex:commandButton value="Clear" onclick="clearSign();return false;" styleClass="button1"/>
          </div>
       </apex:form>
       
        
        <apex:form >
            <apex:pageBlock >
                <apex:pageblockTable value="{!inv}" var="v" styleclass="table table-hover table table-box">
                    <apex:column headerValue="Product name">
                        <apex:outputField value="{!v.name}"/>
                    </apex:column>
                    <apex:column headerValue="Price">
                        <apex:outputField value="{!v.price__c}"/>
                    </apex:column>
                    <apex:column headerValue="Quantity">
                        <apex:outputField value="{!v.quantity__c}"/>
                    </apex:column>
                    <apex:column headerValue="Total">
                        <apex:outputField value="{!v.total_amount__c}"/>
                    </apex:column>
                </apex:pageblockTable>
            </apex:pageBlock>
            <div style="margin-left: 41%;">
            <apex:commandButton value="Generate pdf" action="{!gpdf}" styleClass="button1"/>
            </div>
        </apex:form>
    
    </body>
    <script>
  var canvas;
  var context;
  var drawingUtil;
  var isDrawing = false;
  var accountId = '';
  var prevX, prevY, currX, currY = 0;
  var accountId;

   function DrawingUtil() {
   isDrawing = false;
   canvas.addEventListener("mousedown", start, false);
   canvas.addEventListener("mousemove", draw, false);
   canvas.addEventListener("mouseup", stop, false);
   canvas.addEventListener("mouseout", stop, false);
   canvas.addEventListener("touchstart", start, false);
   canvas.addEventListener("touchmove", draw, false);
   canvas.addEventListener("touchend", stop, false);
   w = canvas.width;
      h = canvas.height;
  }

   function start(event) {
   event.preventDefault();
   
   isDrawing = true;
   prevX = currX;
   prevX = currY;
   currX = event.clientX - canvas.offsetLeft;
   currY = event.clientY - canvas.offsetTop;
   
   context.beginPath();
   context.fillStyle = "cadetblue";
   context.fillRect(currX, currY, 2, 2);
            context.closePath();
   
  }

   function draw(event) {
   event.preventDefault();
   if (isDrawing) {
    prevX = currX;
             prevY = currY;
             currX = event.clientX - canvas.offsetLeft;
             currY = event.clientY - canvas.offsetTop;
    context.beginPath();
    context.moveTo(prevX, prevY);
    context.lineTo(currX, currY);
    context.strokeStyle = "cadetblue";
    context.lineWidth = "2";
    context.stroke();
    context.closePath();
   }
  }

   function stop(event) {
   if (isDrawing) {
    context.stroke();
    context.closePath();
    isDrawing = false;
   }
  }
  
  function clearSign() {
   context.clearRect(0,0,w,h);
  }

   canvas = document.getElementById("signatureCanvas");
  context = canvas.getContext("2d");
  context.strokeStyle = "black";
  context.lineWidth = "2";
  drawingUtil = new DrawingUtil(canvas);
  

   function saveSignature() {
   var strDataURI = canvas.toDataURL();
   strDataURI = strDataURI.replace(/^data:image\/(png|jpg);base64,/, "");
   var accId = location.href.split('=')[1];
   accountId = accId;
   var result = CaptureSignatureController.saveSignature(strDataURI, accId, processResult);
  }

   function processResult(result) {
   alert(JSON.stringify(result));
   window.location.href = '/'+accountId;
  }

  </script>
  
  <style>
  .container1 {
   text-align: center;
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
   color: cadetblue;
   font-weight: 500;
   font-size: 14px;
  }
  
  .button1 {
   font-family: calibri;
   border-radius: 8px;
   background-color: rgb(51, 116, 116);
   height: 36px;
   color: azure;
   font-size: 17px;
   border-width: 0px;
   width: 116px;
  }
 </style>   
</apex:page>


controller


global with sharing class upl1 
{
    public List<cart__c> inv{get;set;}
    Id id;
    
    global upl1()
    {
        id=ApexPages.currentPage().getParameters().get('cid');
        inv=new List<cart__c>();
        inv=[select name,type__c,price__c,quantity__c,total_amount__c from cart__c where consumer__c=:id];
        
        
    }
    global static String saveSignature(String imageUrl, String accountId) 
 {
  
      try 
      {
       Attachment accSign = new Attachment();
       accSign.ParentID = accountId;
       accSign.Body = EncodingUtil.base64Decode(imageUrl);
       accSign.contentType = 'image/png';
       accSign.Name = 'Signature Image';
       accSign.OwnerId = UserInfo.getUserId();
       insert accSign;
       
       return 'success';
       
      }
      catch(Exception e)
      {
       system.debug('---------- ' + e.getMessage());
       return JSON.serialize(e.getMessage());
      }
  return null; 
 }
   
 
    public String rt{get;set;}
    public PageReference gpdf()
    {
       rt='pdf';
       attach();
        PageReference reRend2 = new PageReference('https://ap2.salesforce.com/'+id);
                                  reRend2.setRedirect(true);
                                   return reRend2;  
    }
    public void attach() 
        {
        Attachment myAttach = new Attachment();
        myAttach.ParentId = id;//Id of the object to which the page is attached
        myAttach.name = 'inv.name.pdf';
        PageReference myPdf = Page.task7i;//myPdfPage is the name of your pdf page
        myAttach.body = myPdf.getContentAsPdf();
        insert myAttach;
        
        }

}User-added image


User-added image
 
im unable to get the index of row...see my code 


vf page:-

<apex:page controller="t6">
  <apex:form >
      <apex:pageBlock id="yu">
          <apex:variable var="rowNumber" value="{!0}"/>
          <apex:pageBlockButtons >
              <apex:commandButton value="Add row" action="{!ar}" reRender="yu"/>
          </apex:pageBlockButtons>
          <apex:pageBlockSection >
              <apex:pageBlockTable value="{!qe}" var="y">
                  <apex:column headerValue="index">
                      <apex:outputText value="{0}">
                          <apex:param value="{!rowNumber+1}"/>
                      </apex:outputText>
                  </apex:column>
                  <apex:column >
                      <apex:commandButton value="remove" action="{!remove}" reRender="eee"/>
                          <apex:param name="index" value="{!rowNumber}" />
                  </apex:column>
                  <apex:column headerValue="name">
                      <apex:inputField value="{!y.name}"/>
                  </apex:column>
                  <apex:column headerValue="account" >
                      <apex:inputField value="{!y.Account__c}" >
                          <apex:actionSupport event="onchange" action="{!chng}" />
                      </apex:inputField>
                  </apex:column>
                   <apex:column headerValue="contacts">
                      <apex:selectList size="1" multiselect="false" >
                          <apex:selectOptions value="{!connames}">
                          </apex:selectOptions>
                      </apex:selectList>
                  </apex:column> 
                  <apex:column headerValue="amount">
                      <apex:inputField value="{!y.currency__c}"/>
                      <apex:variable var="rowNumber" value="{!rowNumber+1}"/>
                  </apex:column>
              </apex:pageBlockTable>
          </apex:pageBlockSection>
      </apex:pageBlock>
  </apex:form>
</apex:page>


controller:-


public class t6 
{
    public List<sales__c> qe {get;set;}
    public Integer rowNumber{get;set;}
    
    
    //Integer inx;
    sales__c s;
    String t; 
    public t6()
    {
      s=new sales__c();
      qe=new List<sales__c>();
      qe.add(s);  
    }
    
    public void ar()
    {
        sales__c s1=new sales__c();
        qe.add(s1);
    }
    public void remove()
    {
        
        //qe.remove(1);
        //rowNumber = Integer.valueOf(ApexPages.currentPage().getParameters().get('index'));
        System.debug(rowNumber);
       
        
    }
    public void chng()
    {
        sales__c f=new sales__c();                               
        f=qe[qe.size()-1];
        t=f.account__c;
        
    }
    
    public List<SelectOption> getConnames()
    {
        List<SelectOption> allc=new List<SelectOption>();
        
        for(Contact c:[SELECT id,name,email from Contact where Account.Id=:t])
        {
            allc.add(new SelectOption(c.id,c.name));
        }
        
       return allc; 
       
    }
}
 
hi guys..
i have 3 collumns 
1-date on which record is created
2-delete(command link)
3-edit(Command Link)

i want to hide delete and edit command link for those whose created date is not today..

thanks in advance
regards 
Anuj
i want to same multiple records at one click im have following problems

1 dublicate records are creating
2 all records is save with same value


apex code

<apex:page controller="sample1">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!task}" var="p">
                <apex:column headerValue="values">
                    <apex:outputText value="{!p}">
                    </apex:outputText>
                </apex:column>
                
                <apex:column headerValue="15%">
                    <apex:inputText value="{!a}" />
                </apex:column>
                
                 <apex:column headerValue="20%">
                     <apex:inputtext value="{!b}"/>
                </apex:column>
                
                 <apex:column headerValue="30%">
                     <apex:inputtext value="{!c}"/>
                </apex:column>
                
            </apex:pageBlockTable>
            
             <apex:pageBlockButtons >
                 <apex:commandButton value="save" action="{!save}"/>
             </apex:pageBlockButtons>
           
          
        </apex:pageBlock>
    </apex:form>
</apex:page>


controller


public class sample1 
{

   
    
    List<String> s=new List<String>();
    public String x{get;set;}
    public Integer a{get;set;}
    public Integer b{get;set;}
    public Integer c{get;set;}
    
        public List<String> getTask()
        {
            List<SelectOption> options = new List<SelectOption>();
            Schema.DescribeFieldResult fieldResult = Account.task__c.getDescribe();
            List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
            
            for( Schema.PicklistEntry f : ple)
               {
                  //options.add(new SelectOption(f.getLabel(), f.getValue()));
                  //System.debug(f.getLabel());
                  s.add(f.getValue());
               }
             
            return s;
        }
    
     public void save() 
     {
          for(String x:s)
              {
                  task__c t = new task__c(Name=x,X15__c=a,X20__c=b,X30__c=c);
                  
                try
                   {
                       insert t;
                   }
              
               catch(Exception e)
                  {
                      ApexPages.addMessages(e);
                  }
              }
          
                       
     }
    
    
 
}

in my object A there is  a picklist i want to show all the values of picklist in text box in apex page

dont use triggrer

apex page


<apex:page controller="accToPick">
<apex:form >
<apex:pageBlock title="Accounts">
 
<apex:pageBlockSection >

<apex:selectList size="1" multiselect="false" value="{!val}">

<apex:selectOptions value="{!accounnames}"/>
<apex:actionSupport event="onchange" action="{!conload}" reRender="conlist" />
</apex:selectList>
</apex:pageBlockSection>

<apex:pageBlockTable id="conlist"  var="a" value="{!ist}">
<apex:column value="{!a.name}"/>
<apex:Column headerValue="action" > 
<apex:commandLink value="delete" action="{!deletecon}" reRender="conlist">
<apex:param name="index" value="{!a.id}" assignTo="{!index}"/>
</apex:commandLink>
</apex:Column>
<apex:column value="{!a.email}"/>>
<apex:column headerValue="send Email to">
<apex:inputCheckbox value="{!selected}"/>

</apex:column>
</apex:pageBlockTable>
<apex:commandButton value="send Mail" action="{!sendmail}"/>
</apex:pageBlock>

    <apex:pageBlock >
    
    
    <apex:outputLabel >First Name</apex:outputLabel>
    <apex:inputText value="{!fname}" />
    
    <apex:outputLabel >Last name</apex:outputLabel>
    <apex:inputText value="{!lname}"/>
    
    <apex:pageBlockButtons >
    <apex:commandButton value="add Contacts" action="{!addContact}"/>
       
       
    </apex:pageBlockButtons>
    
    </apex:pageBlock>
    

</apex:form>

</apex:page>


controller

public class accToPick 
{

   

    
List<Account> acc;
public String val{get;set;}
 public List<Contact> ist{get;set;}
  public String index {get;set;}
  public Boolean selected {get; set;}
  public String fname{get;set;}
  public String lname{get;set;}
  

    public accToPick()
    {
    acc= [SELECT id,name FROM Account];
    
    
    
    }
    
        
 
    
    public List<SelectOption> getAccounnames() 
    {
        List<SelectOption> accOptions= new List<SelectOption>();
        for(Account acc2:acc)
            {
            
            accOptions.add(new selectOption(acc2.id,acc2.name));
            }
        return accOptions;
    }
    

    public List<Contact> conload()
    {    
          ist= [SELECT id,name,email from Contact where Account.Id=:val];
         return null;
    }
    
    public void addContact()
        {
        Contact lc=new Contact(FirstName=fname,LastName=lname,AccountId=val);
        
        try
        {
        insert lc;
        }
        catch(Exception e)
        {
        ApexPages.addMessages(e);
        }
        conload();
        fname='';
        lname='';
        }
     
     public void deletecon()
     {
      Contact c1=[select id from Contact where id=:index];
      delete c1;
      conload();
     }
     
     public PageReference sendmail()
     {
         List<cContact> contactList = new List<cContact>();
        
            
              
            for(Contact c : [select Id, Name, Email, Phone from Contact where AccountId =:val])
            {
                contactList.add(new cContact(c));
            }
            
         List<Contact> selectedContacts = new List<Contact>();
        for(cContact cCon :contactList) 
        {System.debug(cCon.selected + ' if ');
            if(cCon.selected == true) 
            {
                //selectedContacts.add(cCon.con);
                System.debug(cCon.con.name + ' if ');
            }
            else
            {
                System.debug(cCon.con.name + ' else ');
            }
        }
        /*System.debug('These are the selected Contacts…');
        for(Contact con : selectedContacts) 
        {
            string conEmail = con.Email;
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
            String[] toAddresses = new String[] {conEmail};
            mail.setToAddresses(toAddresses);
            mail.setReplyTo('huria.99.anuj@gmail.com');
            mail.setSenderDisplayName('Salesforce Support');
            mail.setSubject('New Case Created : ' + case.Id);
            mail.setBccSender(false);
            mail.setUseSignature(false);
            mail.setPlainTextBody('Thank for Contacting');
            mail.setHtmlBody('Thank for Contacting');
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
        }*/
        return null;
     }
     
      public class cContact 
      {
        public Contact con {get; set;}
        public Boolean selected {get; set;}
        public cContact(Contact c)
        {
            con = c;
            selected = false;
        }
    }
    
    
}


 
Hi Guys,
I was integrating Instagram  with Salesforce,and getting access_tokek in url like this

https://c.ap2.visual.force.com/apex/instaIntegration#access_token=6394********83e.**********8af6330377c35d316

i dont know how to get the access token attached with'#'

Thanks
hi guys i created a vf page,in which im getting the customer's signature on canvas, and saving that page as pdf in the realted list of attachment,
but problem is that the signature is not visible in pdf look into my code 

vf page

<apex:page controller="upl1" SHowHeader="false" sidebar="false" standardStylesheets="false" >
    
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <apex:stylesheet value="{!URLFOR($Resource.bootstrap,'bootstrap-3.3.6-dist/css/bootstrap.min.css')}"/>
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"/>
    <apex:includeScript value="{!URLFOR($Resource.bootstrap,'bootstrap-3.3.6-dist/js/bootstrap.min.js')}"/>
    
    </head>
        

    <body>  
            <div class="well well-lg text-center"><h1>Invoice</h1></div>
        
            <apex:form id="pbform">
          <apex:pageMessages />
          <div class="container1">
           <h1 class="labelCol vfLabelColTextWrap ">Record Signature:</h1>
           <canvas id="signatureCanvas" height="100px" width="350px" style="border: 3px solid antiquewhite; border-radius: 8px;" ></canvas>
          </div><br/>
          
          <div style="margin-left: 41%;">
           <apex:commandButton value="Save Signature" onclick="saveSignature();return false;" styleClass="button1"/>&nbsp;&nbsp;&nbsp;
           <apex:commandButton value="Clear" onclick="clearSign();return false;" styleClass="button1"/>
          </div>
       </apex:form>
       
        
        <apex:form >
            <apex:pageBlock >
                <apex:pageblockTable value="{!inv}" var="v" styleclass="table table-hover table table-box">
                    <apex:column headerValue="Product name">
                        <apex:outputField value="{!v.name}"/>
                    </apex:column>
                    <apex:column headerValue="Price">
                        <apex:outputField value="{!v.price__c}"/>
                    </apex:column>
                    <apex:column headerValue="Quantity">
                        <apex:outputField value="{!v.quantity__c}"/>
                    </apex:column>
                    <apex:column headerValue="Total">
                        <apex:outputField value="{!v.total_amount__c}"/>
                    </apex:column>
                </apex:pageblockTable>
            </apex:pageBlock>
            <div style="margin-left: 41%;">
            <apex:commandButton value="Generate pdf" action="{!gpdf}" styleClass="button1"/>
            </div>
        </apex:form>
    
    </body>
    <script>
  var canvas;
  var context;
  var drawingUtil;
  var isDrawing = false;
  var accountId = '';
  var prevX, prevY, currX, currY = 0;
  var accountId;

   function DrawingUtil() {
   isDrawing = false;
   canvas.addEventListener("mousedown", start, false);
   canvas.addEventListener("mousemove", draw, false);
   canvas.addEventListener("mouseup", stop, false);
   canvas.addEventListener("mouseout", stop, false);
   canvas.addEventListener("touchstart", start, false);
   canvas.addEventListener("touchmove", draw, false);
   canvas.addEventListener("touchend", stop, false);
   w = canvas.width;
      h = canvas.height;
  }

   function start(event) {
   event.preventDefault();
   
   isDrawing = true;
   prevX = currX;
   prevX = currY;
   currX = event.clientX - canvas.offsetLeft;
   currY = event.clientY - canvas.offsetTop;
   
   context.beginPath();
   context.fillStyle = "cadetblue";
   context.fillRect(currX, currY, 2, 2);
            context.closePath();
   
  }

   function draw(event) {
   event.preventDefault();
   if (isDrawing) {
    prevX = currX;
             prevY = currY;
             currX = event.clientX - canvas.offsetLeft;
             currY = event.clientY - canvas.offsetTop;
    context.beginPath();
    context.moveTo(prevX, prevY);
    context.lineTo(currX, currY);
    context.strokeStyle = "cadetblue";
    context.lineWidth = "2";
    context.stroke();
    context.closePath();
   }
  }

   function stop(event) {
   if (isDrawing) {
    context.stroke();
    context.closePath();
    isDrawing = false;
   }
  }
  
  function clearSign() {
   context.clearRect(0,0,w,h);
  }

   canvas = document.getElementById("signatureCanvas");
  context = canvas.getContext("2d");
  context.strokeStyle = "black";
  context.lineWidth = "2";
  drawingUtil = new DrawingUtil(canvas);
  

   function saveSignature() {
   var strDataURI = canvas.toDataURL();
   strDataURI = strDataURI.replace(/^data:image\/(png|jpg);base64,/, "");
   var accId = location.href.split('=')[1];
   accountId = accId;
   var result = CaptureSignatureController.saveSignature(strDataURI, accId, processResult);
  }

   function processResult(result) {
   alert(JSON.stringify(result));
   window.location.href = '/'+accountId;
  }

  </script>
  
  <style>
  .container1 {
   text-align: center;
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
   color: cadetblue;
   font-weight: 500;
   font-size: 14px;
  }
  
  .button1 {
   font-family: calibri;
   border-radius: 8px;
   background-color: rgb(51, 116, 116);
   height: 36px;
   color: azure;
   font-size: 17px;
   border-width: 0px;
   width: 116px;
  }
 </style>   
</apex:page>


controller


global with sharing class upl1 
{
    public List<cart__c> inv{get;set;}
    Id id;
    
    global upl1()
    {
        id=ApexPages.currentPage().getParameters().get('cid');
        inv=new List<cart__c>();
        inv=[select name,type__c,price__c,quantity__c,total_amount__c from cart__c where consumer__c=:id];
        
        
    }
    global static String saveSignature(String imageUrl, String accountId) 
 {
  
      try 
      {
       Attachment accSign = new Attachment();
       accSign.ParentID = accountId;
       accSign.Body = EncodingUtil.base64Decode(imageUrl);
       accSign.contentType = 'image/png';
       accSign.Name = 'Signature Image';
       accSign.OwnerId = UserInfo.getUserId();
       insert accSign;
       
       return 'success';
       
      }
      catch(Exception e)
      {
       system.debug('---------- ' + e.getMessage());
       return JSON.serialize(e.getMessage());
      }
  return null; 
 }
   
 
    public String rt{get;set;}
    public PageReference gpdf()
    {
       rt='pdf';
       attach();
        PageReference reRend2 = new PageReference('https://ap2.salesforce.com/'+id);
                                  reRend2.setRedirect(true);
                                   return reRend2;  
    }
    public void attach() 
        {
        Attachment myAttach = new Attachment();
        myAttach.ParentId = id;//Id of the object to which the page is attached
        myAttach.name = 'inv.name.pdf';
        PageReference myPdf = Page.task7i;//myPdfPage is the name of your pdf page
        myAttach.body = myPdf.getContentAsPdf();
        insert myAttach;
        
        }

}User-added image


User-added image
 
i want to same multiple records at one click im have following problems

1 dublicate records are creating
2 all records is save with same value


apex code

<apex:page controller="sample1">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!task}" var="p">
                <apex:column headerValue="values">
                    <apex:outputText value="{!p}">
                    </apex:outputText>
                </apex:column>
                
                <apex:column headerValue="15%">
                    <apex:inputText value="{!a}" />
                </apex:column>
                
                 <apex:column headerValue="20%">
                     <apex:inputtext value="{!b}"/>
                </apex:column>
                
                 <apex:column headerValue="30%">
                     <apex:inputtext value="{!c}"/>
                </apex:column>
                
            </apex:pageBlockTable>
            
             <apex:pageBlockButtons >
                 <apex:commandButton value="save" action="{!save}"/>
             </apex:pageBlockButtons>
           
          
        </apex:pageBlock>
    </apex:form>
</apex:page>


controller


public class sample1 
{

   
    
    List<String> s=new List<String>();
    public String x{get;set;}
    public Integer a{get;set;}
    public Integer b{get;set;}
    public Integer c{get;set;}
    
        public List<String> getTask()
        {
            List<SelectOption> options = new List<SelectOption>();
            Schema.DescribeFieldResult fieldResult = Account.task__c.getDescribe();
            List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
            
            for( Schema.PicklistEntry f : ple)
               {
                  //options.add(new SelectOption(f.getLabel(), f.getValue()));
                  //System.debug(f.getLabel());
                  s.add(f.getValue());
               }
             
            return s;
        }
    
     public void save() 
     {
          for(String x:s)
              {
                  task__c t = new task__c(Name=x,X15__c=a,X20__c=b,X30__c=c);
                  
                try
                   {
                       insert t;
                   }
              
               catch(Exception e)
                  {
                      ApexPages.addMessages(e);
                  }
              }
          
                       
     }
    
    
 
}

hi guys im new for writing test class

heelp me writting test class for this class

public  class GetImageHandler {

    public GetImageHandler() {

    }
    
   Contact c= new Contact(); 
     public void save(){
    
      c.LastName='hemant';
     c.Email='jaguu@juglee.com';
     insert c;
     Send();
     }

     public void de(){
    
      delete c;
     }

    public final Opportunity Op;

    Opportunity opp = new Opportunity();
    
    public Id parentId;
    
         public GetImageHandler(ApexPages.StandardController controller) {
    
                parentId= ApexPages.currentPage().getParameters().get('id');
                
                opp = [Select Name,Id,Primary_Contact__r.Email from Opportunity where Id=: parentId];
    
    }
   public PageReference savePdf() {

    PageReference pdf = Page.quote;
    // add parent id to the parameters for standardcontroller
    pdf.getParameters().put('id',parentId);

    // create the new attachment
    Attachment attach = new Attachment();

    // the contents of the attachment from the pdf
    Blob body;

    try {

        // returns the output of the page as a PDF
        body = pdf.getContent();

    // need to pass unit test -- current bug    
    } catch (VisualforceException e) {
        body = Blob.valueOf('Some Text');
    }

    attach.Body = body;
    // add the user entered name
    attach.Name = 'Quote_'+opp.Name+'_'+System.Today().year()+'.pdf';
    attach.IsPrivate = false;
    // attach the pdf to the account
    attach.ParentId = parentId;
    insert attach;
   save();
    // send the user to the account to view results
    return new PageReference('https://c.cs14.visual.force.com/'+parentId);

  }
    
   public PageReference saveExl() {

    PageReference pdf = Page.quoteexl;
    // add parent id to the parameters for standardcontroller
    pdf.getParameters().put('id',parentId);

    // create the new attachment
    Attachment attach = new Attachment();

    // the contents of the attachment from the pdf
    Blob body;

    try {

        // returns the output of the page as a PDF
        body = pdf.getContent();

    // need to pass unit test -- current bug    
    } catch (VisualforceException e) {
        body = Blob.valueOf('Some Text');
    }

    attach.Body = body;
    // add the user entered name
    attach.Name = 'Quote_'+opp.Name+'_'+System.Today().year()+'.xls';
    attach.IsPrivate = false;
    // attach the pdf to the account
    attach.ParentId = parentId;
    insert attach;
    Save();
    // send the user to the account to view results
    return new PageReference('https://c.cs14.visual.force.com/'+parentId);

  }
  
 public PageReference send() {
                Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 
                String addresses;
                if (opp.Primary_Contact__r.Email!= null) {
                    addresses = opp.Primary_Contact__r.Email;
                
                }
                  email.setTargetObjectId(c.id);
                  email.setWhatId(Opp.id);
                  //email.setTemplateId('00X28000000QK5V');
                  email.setSubject('Revised Quote');
                  email.setToAddresses(new String[] { addresses });
               // email.setToAddress(addresses);
                  email.setPlainTextBody( 'Please Find Attachment');
        
                
                    
                     List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
                       // for (Attachment a : [select Name, Body, BodyLength from Attachment where ParentId = :opp.Id])
                     //   {
                        // Add to attachment file list
                        List<Attachment> a = [select Name, Body, BodyLength from Attachment where ParentId = :opp.Id Order by Createddate desc Limit 1];
                        Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();
                        efa.setFileName(a[0].Name);
                        efa.setBody(a[0].Body);
                        fileAttachments.add(efa);
                       // }
                        email.setFileAttachments(fileAttachments);
                      //Send email
                        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
       
         
                de();

                return new PageReference('https://c.cs14.visual.force.com/'+parentId);
            }
 
}
hi guys im newbie in integration
 i have a requirement in vf page 

1) inputText to enter email
2) inputText to enter password
3) login button
by pressing the login button i should login in to my fb account

please tell me how can i achive this

=> if i create an account in my org,same account should be create in another org

suggest me some ideas and code if possible

trigger contactCounttriger on Contact (After insert, After Delete, After Undelete,after update) { Set<id> setAccountId=new Set<id>(); if(Trigger.isInsert || Trigger.isUndelete || Trigger.isUpdate){ for(Contact con:Trigger.New){ setAccountId.add(con.AccountId); } } if(Trigger.IsDelete){ for(Contact con:Trigger.old){ setAccountId.add(con.AccountId); } } List<Account> listAcc=[select id,no_of_contacts__c,(Select id from Contacts)from Account where id in:setAccountId]; for(Account acc:listAcc){ acc.no_of_contacts__c=acc.contacts.size(); } update listAcc; }
I'm having trouble getting my head around returning the ID of a newly created record & inserting it into a field on the original object.  I'm trying to automatically create a campaign from a custom object (Listing__c) (which is working) but I've tried various ways of inserting the campaign ID into the Campaign__c field on the Listing and it's just not working.  

Can someone help me out?

Current Trigger:
trigger CreateCampaign on Listing__c (after insert)
 {

// Create Associated Campaign when Listing is Created
 
    List<Campaign> CampaignInsert=new List<Campaign>();
    for(Listing__c L: trigger.new)
 


 CampaignInsert.add(new Campaign(
                                  Name=L.Deal_Name__c,
                                  Type='Email - Property Listing',
                                  IsActive=True,
                                  Status='New'                                                                                                     
                                                    ));
 }   
    try{
    if(CampaignInsert != Null){
          insert CampaignInsert;          
    }
    }Catch(Exception e){
        System.debug('Exception ****'+e.getMessage());
        System.debug(Campaign.id);
     }
}
controller


public class accToPick 
{

   

    
List<Account> acc;
public String val{get;set;}
 public List<cContact> ist{get;set;}
  public String index {get;set;}
  
  public String fname{get;set;}
  public String lname{get;set;}
  

    public accToPick()
    {
    acc= [SELECT id,name FROM Account];
    
    
    
    }
    
        
 
    
    public List<SelectOption> getAccounnames() 
    {
        List<SelectOption> accOptions= new List<SelectOption>();
        for(Account acc2:acc)
            {
            
            accOptions.add(new selectOption(acc2.id,acc2.name));
            }
        return accOptions;
    }
    

    public List<cContact> conload()
    {    
          ist= new List<cContact>();
        for(Contact a:[SELECT id,name,email from Contact where Account.Id=:val])
        {
            ist.add(new cContact(a));
        }
        
         return null;
    }
    
    public void addContact()
        {
        Contact lc=new Contact(FirstName=fname,LastName=lname,AccountId=val);
        
            try
            {
                insert lc;
            }
            
            catch(Exception e)
            {
                ApexPages.addMessages(e);
            }
            conload();
            fname='';
            lname='';
        }
     
     public void deletecon()
     {
      Contact c1=[select id from Contact where id=:index];
      delete c1;
      conload();
     }
     
     public PageReference sendmail()
     {
         List<Contact> selectedContacts = new List<Contact>();
        
            
              
           
            
         
         //System.debug(selected + 'abc');
        for(cContact cCon :ist) 
        {
        
            if(cCon.selected==true) 
            {
                selectedContacts.add(cCon.con);
                
            }
            
        }
        System.debug('These are the selected Contacts…');
        for(Contact con : selectedContacts) 
        {
            string conEmail = con.Email;
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
            String[] toAddresses = new String[] {conEmail};
            mail.setToAddresses(toAddresses);
            mail.setReplyTo('huria.99.anuj@gmail.com');
            mail.setSenderDisplayName('Salesforce Support');
            mail.setSubject('New Case Created : ' + case.Id);
            mail.setBccSender(false);
            mail.setUseSignature(false);
            mail.setPlainTextBody('Thank for Contacting');
            mail.setHtmlBody('Thank for Contacting');
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
        }
        return null;
     }
     
      public class cContact 
      {
        public Contact con {get; set;}
        public Boolean selected {get; set;}
        public cContact(Contact c)
        {
            con = c;
            selected = false;
        }
    }
    
    
}
controller

public class AddmultipleAccountsController {
Account account = new Account();
public list<Account> listAccount{ get; set; }

public AddmultipleAccountsController()
{
listAccount=new list<Account>();
listAccount.add(account);
}

Public void addAccount()
{
Account acc = new Account();
listAccount.add(acc);
}
public PageReference saveAccount() {
for(Integer i=0; i<listAccount.size(); i++)
{
insert listAccount;
}
return Page.addmore;
}
}

test class

@isTest
public class addmul_test 
{
    static testmethod void addtest()
    {
        AddmultipleAccountsController ar=new AddmultipleAccountsController();
        pagereference pf=Page.addmore;
        ar.addAccount();
       
       
        ar.saveAccount();       
        
        
       
        
        
    }
}
When I am searching for a parent account ,there is usually a magnifier glass that allows the users to search for the parent. for some reason my VF page doesn't show the magnifier glass. the code works . If I enter a wrong parent name it will not let me submit and it tells me that its wrong name but the magnifier glass which is suppose to help me search for the parent account name, doesn't display on my page
 
​<apex:pageBlockSectionItem rendered="{!IF($Profile.Name =='test', false , true)}"> <apex:outputLabel value="Parent Account" for="acctparent" /> 
<apex:inputField id="acctparent" value="{!account.ParentId}" /> </apex:pageBlockSectionItem>

 
I have written a test class for apex class.i got 89% but 'for loop' is not covered represented as below screenshot.how to achieve morethan 90%?can you anybody help me where iam missing exactly.
apex class:

public with sharing class Rfleet_Financial_Informations {
    //Variable Declaration Parts
    public List < RFLEET_Account_Protocol__c > contt {get;set;}
    public List < EditableContact > myAssociatedContact {get;set;}
    public Integer editableContactNumber {get;set;}
    public Boolean refreshPage {get;set;}
    public String protocolname {get;set;}
    public String id;
    //Constructor for invoking the Records from AccountProrocol Object
    public Rfleet_Financial_Informations(ApexPages.StandardController stdCtrl) {
            id = ApexPages.currentPage().getParameters().get('id');
            myAssociatedContact = new List < EditableContact > ();
            Integer counter = 0;
            RFLEET_Protocol__c conn = [select name from RFLEET_Protocol__c where id = : id];
            protocolname = conn.name;
            contt = [select Name,Rfleet_Billing_Account__r.Name, Rfleet_Id_Alcor__c, Rfleet_Billing_Account_Type__c, Rfleet_Billing_Account__r.Rfleet_Street_Number__c, Rfleet_Billing_Account__r.Rfleet_Country__c, Rfleet_Billing_Account__r.Rfleet_Zip_Code__c, Rfleet_Billing_Account__r.Rfleet_State_Province__c, Rfleet_Billing_Account__r.Rfleet_City__c, Rfleet_Billing_Account__r.Rfleet_Street_Name__c from RFLEET_Account_Protocol__c where Rfleet_Protocol__c = : id];
            for (RFLEET_Account_Protocol__c myContact: contt) {
                myAssociatedContact.add(new EditableContact(myContact, false, counter));
                counter++;
            }
        }
        // This method is used for deleting the Row
    public void deleteRowEditAction() {
        try {
            myAssociatedContact.get(editableContactNumber).editable = false;
            delete(myAssociatedContact.get(editableContactNumber).myContact);
        } catch (Exception e) {}
        refreshPage = true;
    }
    public class EditableContact {
        public RFLEET_Account_Protocol__c myContact {get;set;}
        public Boolean editable {get;set;}
        public Integer counterNumber {get;set;}
        public EditableContact(RFLEET_Account_Protocol__c myContact, Boolean editable, Integer counterNumber) {
            this.myContact = myContact;
            this.editable = editable;
            this.counterNumber = counterNumber;
        }
    }
}

test class:
@isTest
public class Rfleet_Financial_Informations_Test {
    static testMethod void financialtest() {
    Billing_Repository__c brc = new Billing_Repository__c(Name='frest',Rfleet_City__c='cger',Rfleet_Country__c='japan',Rfleet_Zip_Code__c='7854',CurrencyIsoCode='EUR');
        Account acc = new Account(Name = 'cooluma',montant__c=0.2);
        acc.Rfleet_Id_Alcor__c=brc.id;
        acc.Rfleet_Street_Name__c ='gff';
        acc.Rfleet_Street_Number__c ='232';
        acc.Rfleet_Country__c ='fdffd';
        acc.Rfleet_City__c ='cdfdf';
        acc.Rfleet_State_Province__c ='dfdf';
        acc.Rfleet_Zip_Code__c ='dfdfnhj';
    insert acc;
        acc.Name = 'vfggf';
        update acc;

        RFLEET_Protocol__c test = new RFLEET_Protocol__c(Name = 'prabu');
        insert test;
        test.Name = 'prabu';
        update test;
        RFLEET_Account_Protocol__c myContact = new RFLEET_Account_Protocol__c(Rfleet_Billing_Account__c = acc.Id, Rfleet_Billing_Account_Type__c = 'Vehicle', Rfleet_City__c =acc.Rfleet_City__c,Rfleet_Country__c =acc.Rfleet_Country__c, Rfleet_Id_Alcor__c = acc.Rfleet_Id_Alcor__c,
            Rfleet_Protocol__c = acc.Id, Rfleet_State_Province__c =acc.Rfleet_State_Province__c , Rfleet_Street_name__c =acc.Rfleet_Street_Name__c, Rfleet_Street_number__c = acc.Rfleet_Street_Number__c, Rfleet_Zip_code__c =acc.Rfleet_Zip_Code__c);


        string name = 'ListConditionCheck';
        Boolean editable;
        Integer counternumber;

        Rfleet_Financial_Informations.editableContact wra = new Rfleet_Financial_Informations.EditableContact(mycontact, editable, counterNumber);
        test = [select id, Name from RFLEET_Protocol__c LIMIT 1];
        PageReference vfpage = Page.Rfleet_Financial_Informations;
        System.test.SetCurrentpage(vfpage);
        Apexpages.currentPage().getparameters().put('id',test.id);
        Apexpages.StandardController sc = new Apexpages.StandardController(test);
        Rfleet_Financial_Informations fintest = new Rfleet_Financial_Informations(sc);
        fintest.deleteRowEditAction();
        fintest.id = acc.Id;
    }
   
}
screenshot:
not covered in test class