+ Start a Discussion

Visualforce Error:value for inputField is not a dynamic binding!

I have the following visualforce code and controller:
The error seems to be in the "<apex:inputField>" tag,
If i change this to <apex:inputText>,it is working but the changes made to Serial Number field are not saved.

Please help me!


public with sharing class receivecont2 {
Purchase_order__c po;
Product_serial__c[] psl;
    public receivecont2(ApexPages.StandardController controller) {
this.po = (Purchase_order__c)controller.getRecord();               
     this.psl = [ SELECT
      Product_serial__c d
       d.purchase_order__c = :po.id];
     public pagereference saveChanges() {
  upsert this.psl;
return null;  
          public pagereference newRec() {
  Product_serial__c d = new Product_serial__c();
  d.Purchase_order__c =this.po.id;
 psl.add( d );
  return null;
public Product_Serial__c[] getRecs() {
  return this.psl;



Visualforce page:

<apex:page standardController="Purchase_Order__c" extensions="receivecont2">
<apex:form >
 <apex:messages />

 <apex:sectionHeader title="Please enter Product Serials " />
 <apex:pageBlock >
  <apex:pageBlockButtons location="bottom">
   <apex:commandButton action="{!saveChanges}" value="Save"/>
       <apex:commandButton action="{!cancel}" value="Back" />
  <apex:pageBlockTable value="{!Recs}" var="test">
  <apex:column value="{!test.Product_disp__c}"/>
   <apex:column value="{!test.Received_Quantity__c}"/>
     <apex:column >

      <apex:inputField value="{!test.Serial_Number__c)"/>



Best Answer chosen by Admin (Salesforce Developers) 

The problem was this:
<apex:inputField value="{!test.Serial_Number__c)"/>

Instead of a curly bracket },there was ')'.

All Answers

Imran MohammedImran Mohammed

What error are you getting when you save the record using apex:inputField?

Hi Imran, The error I am getting is : Visualforce Error:value for inputField is not a dynamic binding whereas if i change to inputtext,there is no error but the values are not saving
Imran MohammedImran Mohammed

Can you make sure whether the serial_number__c field is a read only field?

I feel that the field is a read only field.


Hi Imran,


I have checked the field accessibility ,its editable and is a text field....

Imran MohammedImran Mohammed

Can you check this?

Use apex:inputText and use the system.debug to log the value of Serial_number__c prior you call upsert statement in saveChanges action.

Let me know what you see in the debug logs.



Hi Imran,


Iam not sure how to add this :


System.debug('test: ' +Product_serial__c.Serial_Number__c);



and then i try and save a value in the input text


and meanwhile i check the system log.

13:02:14.993|USER_DEBUG|[15]|DEBUG|test: Serial_Number__c
13:02:15.022|CODE_UNIT_FINISHED|receivecont2 invoke(saveChanges)


I hope iam using system debug correctly the way you want me to...

Imran MohammedImran Mohammed

Did you enter Serial_Number_c in the inputText  field there?

Are the other values other than Serial_Number__c getting saved?


Hi Imran,


Tried entering the serialnumber ,but not working.

Tried with other fields as input text ,this s not working too


And like before the <apex:inputField > tag is not working


The problem was this:
<apex:inputField value="{!test.Serial_Number__c)"/>

Instead of a curly bracket },there was ')'.

This was selected as the best answer
Imran MohammedImran Mohammed

Good to see you finally resolved it.