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

Dynamic Query

Hi I am getting vf page error saying that id Not specifeid in update call. i got the record values using dynamic query into vf as inputfeild.when try to update the values on click of UpdateBarcode  geting the  error.


Vf :


<apex:page controller="Cls_Update_Size" sidebar="false" showHeader="false" >
<apex:form >
<apex:pageBlock id="repeat" >
<div style="margin:10px 300px 10px 400px"><h3 style="margin:10px 10px 10px 2px">Enter Barcode</h3><br/>
<apex:inputText value="{!Barcode}" size="40"/>
<apex:pageMessages />
<apex:panelGrid >
<apex:facet name="header">Select the Feilds to Update</apex:facet>
<table style="margin:0px 0px 0px 0px">
<apex:repeat value="{!Warpmthd}" var="c" id="table" >
<td><apex:inputCheckbox value="{!c.selected}"/>
<apex:outputlabel value="{!c.fl.Label}"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>

<apex:repeat value="{!fields}" var="f">
<strong> <apex:outputlabel value="{!f.label}" /></strong> </td> <td> <apex:inputField value="{!feildvalue[f.fieldPath]}" />
<apex:commandButton action="{!UpdateEntered}" value="Update" style="margin:30px 0px 10px 100px" />
<div style="margin:10px 0px 30px 1100px" ><br/><br/>
<apex:commandButton action="{!Find}" value="Find" rerender="repeat"/>&nbsp;&nbsp;
<apex:commandButton action="{!Oknext}" value="Ok and Next"/>&nbsp;&nbsp;
<apex:commandButton action="{!Close}" value="Close"/>





public class Cls_Update_Size {

public boolean updateButton { get; set; }

public String inputSection { get; set; }

public PageReference UpdateEntered(){
update feildvalue;
return null;

public Samples_Mgmt__c feildvalue{ get; set; }
Public Id SamId=null;
Public Id OffId=null;
public Samples_Mgmt__c sample;
public string size;
list<Samples_Mgmt__c> lstsam= new list<Samples_Mgmt__c>();
list<offer__c> lstoff= new list<offer__c>();
public String Barcode { get; set;}
public list<wrap> lstwrap {get; set;}
List<Schema.FieldSetMember> lstFieldSetMember =new List<Schema.FieldSetMember>();
List<Schema.FieldSetMember> selectedFeilds = new List<Schema.FieldSetMember>();

public Cls_Update_Size(){

lstsam=[select id,Bar_Code__c from Samples_Mgmt__c];
lstwrap=new List<wrap>();

public PageReference Find(){
updateButton =true;
for(wrap w: getWarpmthd()) {
if(w.selected == true) {
feildvalue=new Samples_Mgmt__c();

return null;

public Samples_Mgmt__c getFeildvalues(){

String query = 'SELECT ';
for(Schema.FieldSetMember f : this.getFields()) {
query += f.getFieldPath() + ', ';
query += 'Id, Name FROM Samples_Mgmt__c where id=:SamId';
return Database.query(query);

public List<Schema.FieldSetMember> getFields(){

return selectedFeilds;

public List<wrap> getWarpmthd(){

for(Schema.FieldSetMember mem :lstFieldSetMember){
lstwrap.add(new wrap(mem));
return lstwrap;
Public class Wrap{
public Boolean selected{get; set;}
public Schema.FieldSetMember fl{get; set;}
public Wrap(Schema.FieldSetMember m){
selected = false;



Thanks in advance...

Chaten Raghav 9Chaten Raghav 9

I checked for the issue and would like to share a help link on which customer posted the similar issue and got the resolution.

Please check :-

Please Mark it as "Best Answer" if it helps you.

Chaten Raghav