• Akshit Huria
  • NEWBIE
  • 90 Points
  • Member since 2016
  • Salesforce Developer
  • Self

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 16
    Replies
Hi,

I want to display the output link if the checkbox (Custom checkbox-  Display__c on product2) is checked

<td> <apex:outputLink value="/{!p.id}" target="_top">{!p.product2.name} </apex:outputLink> </td>

Any thought?
Hi,

I have three Objects to Deal with - User (Portal user), Contact and CustomObject.
CustomObject is Child of Contact.

Considering Three Checkbox fields on Custom Child Object I want to display Checkbox True or False in front of user record on VIualforce Page table.
 
//This gives me Logged in users ID and ContactID on his user record
userList  = new List<User>();
    User usr = [Select Id, contactId from User WHERE ID ='XXXyyyyyyyZZZZ' ];
     
//This gives me name of Account of Contact of Logged in User
con = [Select id,Name,AccountId,Account.Name,Phone__c ,Email__c FROM  Contact WHERE ID =: usr.ContactId];
   
//This gives me List of all Contacts for that Account also FIelds on Custom CHild Object of Contact which we need to use for Checkbox Display
contactInfo = [Select id,Name, (SELECT ID ,Active__c,Support__c FROM CustomObject__r)from Contact WHERE AccountId =: con.accountId];
    
//This gives List of Users for those Contacts       
userinfolist = [Select Id,Name,ContactId,Contact.Name,Email,CompanyName,Phone from User Where IsActive = true AND Profile.Name =: Label.SupportUser AND ContactId IN: contactInfo];
    
}

With above information, I can display Name of User, Email and Phone using List "userinfolist ". Now I want to add A column with a checkbox, where if User's Contact record has CustomCHild Object record created and IF Active__c and Support__c field on that child record are True then Display true on userinfolist.

 
Hi there,

I'm sure this is a newbie question (I am a newbie), but i've searched for hours now and cannot find the answer.  So here goes:  I'm simply trying to connect to the SF REST API from Postman (Eventually from our Web Application).  The documentation tells me to create a new connecte app under Apps>>Connected Apps.   I've tried to do this, but there is no button for a "New Connected App".  

Below is what I'm seeing.  I basically just want to test the API.  Currently when I make a request to https://cs51.salesforce.com/services/data/v37.0/sobjects/account outside of Workbench (which works), I get the following response:  
[
  {
    "message": "Session expired or invalid",
    "errorCode": "INVALID_SESSION_ID"
  }
]

My understanding from my reading is that there is a some configuration missing.


User-added image
 
---------Apex controller-------------------

public class sale
{
    public string reas{get; set;}
    public String Index{get; set; }
    public String s{get; set; }
    public List<wclass> sal1{get; set;}
    public List<Selectoption> options;
    public Decimal tval1{get; set;}
    public sale() 
    {
        sal1=new list<wclass>();
        sal1.add(new wclass(new Sales__c(),new list<selectoption>(),0 ));        
    }
    public void c1show()
    {
        options = new List<SelectOption>();
         s=System.currentPageReference().getParameters().get('sss');
        List<Contact> c=new List<Contact>();
        c=[select id,name from contact where Account.Id=:s];
        for(contact c1:c)
        {
            options.add(new SelectOption(c1.id,c1.name));
        }
        Account a=[select AnnualRevenue from account where id=:s];
        tval1=a.AnnualRevenue;
        String q=String.valueOf(tval1);
        System.debug(q);
        for(Integer i=0;i<sal1.size();i++)
        {
            if(s==sal1.get(i).l1.Aname__c)
            {
                sal1.set(i,new wclass(new Sales__c(),options,tval1));
            }
        }
    }
    public void ar()
    {
        wclass s1 =new wclass(new Sales__c(),new list<selectoption>(),0.0);
        sal1.add(s1);
    }
    public void rmv()
    {
        Integer rm=Integer.valueOf(ApexPages.currentPage().getParameters().get('Index'));
        System.debug(rm);
        sal1.remove(rm-1); 
    }
    public void gpdf()
    {
        reas='pdf';
    }
    public class wclass
    {
        public Sales__c l1{get;set;}
        public list<selectoption> ls{get;set;}
        public Decimal tval {get; set;}
        public wclass(Sales__c s1, list<selectoption> s2,Decimal s3)
        {
            l1=s1;
            ls=s2;
            tval=s3;
        }
    }
}

--------------test class---------------------


@isTest (SeeAllData = true)
private class salestest{
    public static testMethod void testMyController() {
         PageReference pageRef = Page.sales; 
         sale saletest =new sale();
        Test.startTest();
        saletest.reas='pdf';
         saletest.tval1=35000000;
        saletest.s='0012800000Mw6WV';
        saletest.Index='2';
        Account a=[select AnnualRevenue from account where id=:saletest.s];
        contact c1= new contact();
       // c1.name='akshit';
         saletest.c1show();
         saletest.ar();
         saletest.rmv();
        saletest.gpdf();
        Test.stopTest();
    }
 }

 
<apex:page controller="pqr">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!links}" var="abc">
                <apex:column headerValue="changes"  >
                    <apex:commandLink value="{!abc}"  action="{!show}">
                        <apex:param value="{!abc}" name="pp" assignTo="{!pp}" />
                    </apex:commandLink>
                </apex:column>
                <apex:column headerValue=" Action">
                    <apex:commandLink value="Delete" action="{!del}" rendered="{!d}" >
                        <apex:param value="{!abc}" name="pp" assignTo="{!pp}" />
                    </apex:commandLink>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <apex:commandLink value="Edit" action="{!edt}"  rendered="{!e}">
                        <apex:param value="{!abc}" name="pp" assignTo="{!pp}" />
                    </apex:commandLink>
                </apex:column>
            </apex:pageBlockTable>
            <apex:pageBlockButtons >
                <apex:commandButton value="back" action="{!back}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
public class pqr
    {
    
        public List<String> links{get; set;}
        public String pp{get; set;}
        public List<quality__c> go{get; set;}
        public Boolean re{get; set;}
        public Boolean res{get; set;}
        public Boolean ed{get; set;}
        public Boolean cn{get; set;}
        public Boolean sv{get; set;}
        public Boolean e{get; set;}
        public Boolean d{get; set;}
        public pqr()
        {
            re=false;
            res=true;
            ed=true;
            links=new List<String>();
            AggregateResult[] ar=[select sdate__c from Quality__c group by sdate__c ];  
            for(AggregateResult a:ar)
            {
              String q= String.valueOf(a.get('sdate__c'));
              links.add(q);
            }
           date dt=System.today();
             String g=String.valueOf(dt);
            for(String p :links)
            {
                String[] re=p.split(' ');
                System.debug(re[0]);
                System.debug(g);
                if(re[0] != g)
                {
                    e=false;
                    d=false;
                }
                else
                {
                    d=true;
                    e=true;                
                }
                System.debug(d);
                
            }  
        }
        public PageReference show()
        {
            cn=false;
            ed=true;
            re=false;
            res=true;
            sv=false;
            go=new List<quality__c>();
            go=[select name, ab__c, bc__c, cd__c from quality__c where sdate__c=: pp];
            PageReference pr=new PageReference('/apex/task4_2');
            return pr;
        }
        public PageReference back()
        {
             PageReference pr=new PageReference('/apex/task4');
            return pr;
        }
        public PageReference back2()
        {
             PageReference pr=new PageReference('/apex/task4_1');
            return pr;
        }
        public void emode()
        {
            re=true;
            res=false;
            ed=false;
            cn =true;
            sv=true;
        }
        public void nmode()
        {
            re=false;
            res=true;
            ed=true;
            cn= false;
            sv=false;
        }
        public void tsave()
        {
            for(Quality__c s : go)
            {
                upsert s;
            }
            re=false;
            res=true;
            sv=false;
            cn=false;
            ed=true;
        }
        public PageReference del()
        { 
            go=new List<quality__c>();
            go=[select name, ab__c, bc__c, cd__c from quality__c where sdate__c=: pp];
            
            delete go;
            PageReference pf=new PageReference('/apex/task4_1');
            pf.setredirect(true);
            return pf;
        }
        public PageReference edt()
        {
            go=new List<quality__c>();
            go=[select name, ab__c, bc__c, cd__c from quality__c where sdate__c=: pp];
            re=true;
            res=false;
            PageReference pr=new PageReference('/apex/task4_2');
            return pr;
        }
    }
User-added image

 
---------------VF page------------------------------
<apex:page controller="abc1" >
  <apex:form >
      <apex:pageBlock >
          <apex:pageBlockTable value="{!pqr}" var="a">
              <apex:column headerValue="Gold">
                  <apex:outputtext value="{!a}" />                
              </apex:column>
              <apex:column headerValue="10%">
                  <apex:inputtext value="{!t1}"/>
              </apex:column>
              <apex:column headerValue="30%">
                  <apex:inputtext value="{!t2}"/>
              </apex:column>
              <apex:column headerValue="50%">
                  <apex:inputtext value="{!t3}"/>
              </apex:column>
          </apex:pageBlockTable>
          <apex:pageBlockButtons >
              <apex:commandButton value="Save" action="{!qsave}" />
          </apex:pageBlockButtons>
      </apex:pageBlock>
  </apex:form>
</apex:page>
-----------/VF Page-----------------

-------------controller Class-------------

public class abc1
{
    public List<Decimal> t1 { get; set; }
    public List<Decimal> t2 { get; set; }
    public List<Decimal> t3 { get; set; }
    public List<String> pqr {get; set;}
    public abc1()
    {
        pqr=new List<String>();
        Schema.DescribeFieldResult fieldResult =Account.a__c.getDescribe();
        List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
        for( Schema.PicklistEntry f:ple)
       {    
          pqr.add(f.getLabel());
       }    
       System.debug(pqr);
    }
    
    public void qsave()
    {    
        System.debug('1');
        Integer i=0;
        List<Quality__c> qqq =new List<Quality__c>();
        Quality__c ccc;
        for(String x:pqr)
        {    System.debug(x);
            ccc= new  Quality__c(Name=x, ab__c=t1[i]);
            qqq.add(ccc);
            System.debug(qqq);
            i++;
        }  
        try
        {
            upsert qqq;
        }
        catch(System.Exception e)
        {
            System.Debug(e);
        }
    }  
}User-added image
I have one Country text field in VF page i am converting into  select option i can able to select values. but i want to select multiple values from dropdown list using check box(multi seklect)? 
Hi,

I was finding this issue so annyoed that I am starting to hate developing code in the Developer Console.
I don't know if this was an issue to everyone OR only to me OR only with Macbook(OS: 10.11.6) OR for whatever the reason.

Issue:
On the Developer conole, when I am trying to using two finger scroll gesture on the trackpad of my Macbook Pro (15" Late 2015) model, the cursor jumps way back to the some 10-15 lines above/below based on which direction I am scrolling.

Developer API Version: 39.0 (Latest at this very moment)

Can someone shed some light on the issue and fix, I would love developing using Developer Console.

Thanks 

 
Hi,

I want to display the output link if the checkbox (Custom checkbox-  Display__c on product2) is checked

<td> <apex:outputLink value="/{!p.id}" target="_top">{!p.product2.name} </apex:outputLink> </td>

Any thought?
Hi,

I have three Objects to Deal with - User (Portal user), Contact and CustomObject.
CustomObject is Child of Contact.

Considering Three Checkbox fields on Custom Child Object I want to display Checkbox True or False in front of user record on VIualforce Page table.
 
//This gives me Logged in users ID and ContactID on his user record
userList  = new List<User>();
    User usr = [Select Id, contactId from User WHERE ID ='XXXyyyyyyyZZZZ' ];
     
//This gives me name of Account of Contact of Logged in User
con = [Select id,Name,AccountId,Account.Name,Phone__c ,Email__c FROM  Contact WHERE ID =: usr.ContactId];
   
//This gives me List of all Contacts for that Account also FIelds on Custom CHild Object of Contact which we need to use for Checkbox Display
contactInfo = [Select id,Name, (SELECT ID ,Active__c,Support__c FROM CustomObject__r)from Contact WHERE AccountId =: con.accountId];
    
//This gives List of Users for those Contacts       
userinfolist = [Select Id,Name,ContactId,Contact.Name,Email,CompanyName,Phone from User Where IsActive = true AND Profile.Name =: Label.SupportUser AND ContactId IN: contactInfo];
    
}

With above information, I can display Name of User, Email and Phone using List "userinfolist ". Now I want to add A column with a checkbox, where if User's Contact record has CustomCHild Object record created and IF Active__c and Support__c field on that child record are True then Display true on userinfolist.

 
Hi there,

I'm sure this is a newbie question (I am a newbie), but i've searched for hours now and cannot find the answer.  So here goes:  I'm simply trying to connect to the SF REST API from Postman (Eventually from our Web Application).  The documentation tells me to create a new connecte app under Apps>>Connected Apps.   I've tried to do this, but there is no button for a "New Connected App".  

Below is what I'm seeing.  I basically just want to test the API.  Currently when I make a request to https://cs51.salesforce.com/services/data/v37.0/sobjects/account outside of Workbench (which works), I get the following response:  
[
  {
    "message": "Session expired or invalid",
    "errorCode": "INVALID_SESSION_ID"
  }
]

My understanding from my reading is that there is a some configuration missing.


User-added image
 
<apex:page standardController="Opportunity" extensions="email_class">
    <apex:form >
           
        <apex:pageBlock title="Email Details">
        
            <apex:pageBlock title="Reciepient">
                <b>TO: </b><br/><apex:inputText value="{!emailTo}"/><p/>
                <b>CC: </b><br/><apex:inputText value="{!emailCC}"/><br/>
                <br/>
                <b>Subject: </b><br/><apex:inputText value="{!subject}" maxlength="200"/><br/>
                <br/>
                <b>Body: </b><br/><apex:inputTextArea value="{!email_body}" rows="10" cols="100"/>
            </apex:pageBlock>          
                    
     <apex:pageBlock title="Attachments">
        <apex:pageBlockTable value="{!Attachments}" var="wrap">
            <apex:column headerValue="Select">
                <apex:inputCheckbox value="{!wrap.selected }"/>
            </apex:column>
       
       <apex:column value="{!wrap.name}"/>
      
       </apex:pageBlockTable><p/>
       </apex:pageblock>
                
       <apex:commandButton value="Send Email" action="{!send}"/>
       <apex:commandButton value="Canel" action="{!cancel}"/>
            
       </apex:pageBlock>
                           
    </apex:form>    
</apex:page>
public class email_class
{
    
    Public string ToAddresses {get;set;}
    Public string CCAddresses {get;set;}
    Public string opportunityId {get;set;}
    Public string subject {get;set;}
    public string email_body {get;set;}
    public string emailTo {get;set;}
    public string emailCC {get;set;}
    
    public class Attachmentwrapper
    {
        public Attachment acc{get; set;}
        public Boolean selected {get; set;}
        public Attachmentwrapper(Attachment a)
        {
            acc = new Attachment();
            acc = a;
        }
    }
    
               
    public email_class(ApexPages.StandardController controller) {
        opportunityId = ApexPages.currentPage().getParameters().get('id');
    }
    
     List<Attachmentwrapper> AttachmentList = new List<Attachmentwrapper>();
     List<Attachment> selectedAttachments = new List<Attachment>();
       
        public List<Attachmentwrapper> getAttachments()
        {
            for (Attachment a : [select Name, Body, BodyLength from Attachment where ParentId = :opportunityId])
            {      
                AttachmentList.add(new Attachmentwrapper(a));
            }
            return AttachmentList;
        }
    
    Public PageReference send()
    {
  
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); // set the to address
        mail.setToAddresses(new String[] {emailTo});
        string [] ccaddress;
            if(emailCC != null && emailCC.trim() != ''){
            ccaddress = emailCC.split(',',0);
            mail.setCcAddresses(ccaddress);
            }
        mail.setSubject(subject);
        mail.setBccSender(false);
        mail.setUseSignature(false);
        mail.setPlainTextBody(email_body);
        mail.setWhatId(opportunityId);// Set email file attachments 

        selectedAttachments.clear();
        List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
        for(Attachmentwrapper accwrapper : AttachmentList){
        if(accwrapper.selected == true){
        Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();
        efa.setFileName(accwrapper.acc.Name);
        efa.setBody(accwrapper.acc.Body);
        fileAttachments.add(efa);
        }
        
        if(!(fileAttachments.isempty()))
            mail.setFileAttachments(fileAttachments);
       
         selectedAttachments.add(accwrapper.acc);
         Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
       }  
        
        PageReference pageRef = new PageReference('/' + opportunityId);
        pageRef.setRedirect(true);
        return pageRef;
        } 
}


 
Hi,

I want to show the all the attachments in a visualforce page. If I click "X" image then corresponding attachment will be deleted in salesforce.

User-added image
Please let me know how to achieve this.

Thanks,
Vijay
Hi Guys
i am new to coding 
What is meant by triggers and context variables?
I had a scenario i.e.i need to display Account Related Contacts using trigger can anyone help me out
Advance Thanks
 
---------Apex controller-------------------

public class sale
{
    public string reas{get; set;}
    public String Index{get; set; }
    public String s{get; set; }
    public List<wclass> sal1{get; set;}
    public List<Selectoption> options;
    public Decimal tval1{get; set;}
    public sale() 
    {
        sal1=new list<wclass>();
        sal1.add(new wclass(new Sales__c(),new list<selectoption>(),0 ));        
    }
    public void c1show()
    {
        options = new List<SelectOption>();
         s=System.currentPageReference().getParameters().get('sss');
        List<Contact> c=new List<Contact>();
        c=[select id,name from contact where Account.Id=:s];
        for(contact c1:c)
        {
            options.add(new SelectOption(c1.id,c1.name));
        }
        Account a=[select AnnualRevenue from account where id=:s];
        tval1=a.AnnualRevenue;
        String q=String.valueOf(tval1);
        System.debug(q);
        for(Integer i=0;i<sal1.size();i++)
        {
            if(s==sal1.get(i).l1.Aname__c)
            {
                sal1.set(i,new wclass(new Sales__c(),options,tval1));
            }
        }
    }
    public void ar()
    {
        wclass s1 =new wclass(new Sales__c(),new list<selectoption>(),0.0);
        sal1.add(s1);
    }
    public void rmv()
    {
        Integer rm=Integer.valueOf(ApexPages.currentPage().getParameters().get('Index'));
        System.debug(rm);
        sal1.remove(rm-1); 
    }
    public void gpdf()
    {
        reas='pdf';
    }
    public class wclass
    {
        public Sales__c l1{get;set;}
        public list<selectoption> ls{get;set;}
        public Decimal tval {get; set;}
        public wclass(Sales__c s1, list<selectoption> s2,Decimal s3)
        {
            l1=s1;
            ls=s2;
            tval=s3;
        }
    }
}

--------------test class---------------------


@isTest (SeeAllData = true)
private class salestest{
    public static testMethod void testMyController() {
         PageReference pageRef = Page.sales; 
         sale saletest =new sale();
        Test.startTest();
        saletest.reas='pdf';
         saletest.tval1=35000000;
        saletest.s='0012800000Mw6WV';
        saletest.Index='2';
        Account a=[select AnnualRevenue from account where id=:saletest.s];
        contact c1= new contact();
       // c1.name='akshit';
         saletest.c1show();
         saletest.ar();
         saletest.rmv();
        saletest.gpdf();
        Test.stopTest();
    }
 }

 
hello,
i am writing below code.
<apex:column headerValue="Product Picture">
         <apex:variable var="imageVar" value="{!abc.xyz.item__r.Url_Name__c}.jpg"/>
                 <apex:image url="{!URLFOR($Resource.KLM, imageVar)}" width="80" height="80"/>
   </apex:column>



here i am displaying image coming from static resource. But if image is not present in static resource then i want to display default image.. How to do it? i am newbie in SF.
<apex:page controller="pqr">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!links}" var="abc">
                <apex:column headerValue="changes"  >
                    <apex:commandLink value="{!abc}"  action="{!show}">
                        <apex:param value="{!abc}" name="pp" assignTo="{!pp}" />
                    </apex:commandLink>
                </apex:column>
                <apex:column headerValue=" Action">
                    <apex:commandLink value="Delete" action="{!del}" rendered="{!d}" >
                        <apex:param value="{!abc}" name="pp" assignTo="{!pp}" />
                    </apex:commandLink>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <apex:commandLink value="Edit" action="{!edt}"  rendered="{!e}">
                        <apex:param value="{!abc}" name="pp" assignTo="{!pp}" />
                    </apex:commandLink>
                </apex:column>
            </apex:pageBlockTable>
            <apex:pageBlockButtons >
                <apex:commandButton value="back" action="{!back}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
public class pqr
    {
    
        public List<String> links{get; set;}
        public String pp{get; set;}
        public List<quality__c> go{get; set;}
        public Boolean re{get; set;}
        public Boolean res{get; set;}
        public Boolean ed{get; set;}
        public Boolean cn{get; set;}
        public Boolean sv{get; set;}
        public Boolean e{get; set;}
        public Boolean d{get; set;}
        public pqr()
        {
            re=false;
            res=true;
            ed=true;
            links=new List<String>();
            AggregateResult[] ar=[select sdate__c from Quality__c group by sdate__c ];  
            for(AggregateResult a:ar)
            {
              String q= String.valueOf(a.get('sdate__c'));
              links.add(q);
            }
           date dt=System.today();
             String g=String.valueOf(dt);
            for(String p :links)
            {
                String[] re=p.split(' ');
                System.debug(re[0]);
                System.debug(g);
                if(re[0] != g)
                {
                    e=false;
                    d=false;
                }
                else
                {
                    d=true;
                    e=true;                
                }
                System.debug(d);
                
            }  
        }
        public PageReference show()
        {
            cn=false;
            ed=true;
            re=false;
            res=true;
            sv=false;
            go=new List<quality__c>();
            go=[select name, ab__c, bc__c, cd__c from quality__c where sdate__c=: pp];
            PageReference pr=new PageReference('/apex/task4_2');
            return pr;
        }
        public PageReference back()
        {
             PageReference pr=new PageReference('/apex/task4');
            return pr;
        }
        public PageReference back2()
        {
             PageReference pr=new PageReference('/apex/task4_1');
            return pr;
        }
        public void emode()
        {
            re=true;
            res=false;
            ed=false;
            cn =true;
            sv=true;
        }
        public void nmode()
        {
            re=false;
            res=true;
            ed=true;
            cn= false;
            sv=false;
        }
        public void tsave()
        {
            for(Quality__c s : go)
            {
                upsert s;
            }
            re=false;
            res=true;
            sv=false;
            cn=false;
            ed=true;
        }
        public PageReference del()
        { 
            go=new List<quality__c>();
            go=[select name, ab__c, bc__c, cd__c from quality__c where sdate__c=: pp];
            
            delete go;
            PageReference pf=new PageReference('/apex/task4_1');
            pf.setredirect(true);
            return pf;
        }
        public PageReference edt()
        {
            go=new List<quality__c>();
            go=[select name, ab__c, bc__c, cd__c from quality__c where sdate__c=: pp];
            re=true;
            res=false;
            PageReference pr=new PageReference('/apex/task4_2');
            return pr;
        }
    }
User-added image

 
---------------VF page------------------------------
<apex:page controller="abc1" >
  <apex:form >
      <apex:pageBlock >
          <apex:pageBlockTable value="{!pqr}" var="a">
              <apex:column headerValue="Gold">
                  <apex:outputtext value="{!a}" />                
              </apex:column>
              <apex:column headerValue="10%">
                  <apex:inputtext value="{!t1}"/>
              </apex:column>
              <apex:column headerValue="30%">
                  <apex:inputtext value="{!t2}"/>
              </apex:column>
              <apex:column headerValue="50%">
                  <apex:inputtext value="{!t3}"/>
              </apex:column>
          </apex:pageBlockTable>
          <apex:pageBlockButtons >
              <apex:commandButton value="Save" action="{!qsave}" />
          </apex:pageBlockButtons>
      </apex:pageBlock>
  </apex:form>
</apex:page>
-----------/VF Page-----------------

-------------controller Class-------------

public class abc1
{
    public List<Decimal> t1 { get; set; }
    public List<Decimal> t2 { get; set; }
    public List<Decimal> t3 { get; set; }
    public List<String> pqr {get; set;}
    public abc1()
    {
        pqr=new List<String>();
        Schema.DescribeFieldResult fieldResult =Account.a__c.getDescribe();
        List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
        for( Schema.PicklistEntry f:ple)
       {    
          pqr.add(f.getLabel());
       }    
       System.debug(pqr);
    }
    
    public void qsave()
    {    
        System.debug('1');
        Integer i=0;
        List<Quality__c> qqq =new List<Quality__c>();
        Quality__c ccc;
        for(String x:pqr)
        {    System.debug(x);
            ccc= new  Quality__c(Name=x, ab__c=t1[i]);
            qqq.add(ccc);
            System.debug(qqq);
            i++;
        }  
        try
        {
            upsert qqq;
        }
        catch(System.Exception e)
        {
            System.Debug(e);
        }
    }  
}User-added image