function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

[Urgent]** How can I dynamically add record to a VF page along with checkbox, the record name & textarea?

What exactly am looking for is I have a custom Object called Types and it has 8 records from type 1 to type 8. 

On other hand, I have a VF page and I have added a static table like below in image

User-added image

If you can see the documentation and email etiquette are the types. So I need to add them dynamically in the VF page of this table from the custom object called Type as mentioned above. 

To make it more clear, I add a new type called "Providing Updates" in type object, this record with checkbox, record name and the textarea box shoule automatically get added in the vf page. 

Can this be achieved?

Thank you. 

You need to create the wrapper class which will have the Sobject with one extra boolean variable 

public class Wrapper
      public Sobject obj {get;set;}
      public Boolean isChecked {get;set;}

now you have take the list of the above wrapper class and bind the isChecked with the checkbox on visualforce page

For adding the dynamic row you need to create one method that will add the blank record of Wrapper class.

Please let me know if this works for you!