You need to sign in to do that
Don't have an account?
conversion error in dynamic inputfield
Hi,
I'm trying to create a dynamic filter where the user can select any fields from a SObject to filter the data (something like the lookup filters). It is working fine, however, the below scenario throws an error:
If the inputField is having a previous value selected (say a String) and I selected a DateTime field in the filter, it tried to convert the string into DateTime and throwing a error. Below is the line in question:
~Ayan
I'm trying to create a dynamic filter where the user can select any fields from a SObject to filter the data (something like the lookup filters). It is working fine, however, the below scenario throws an error:
If the inputField is having a previous value selected (say a String) and I selected a DateTime field in the filter, it tried to convert the string into DateTime and throwing a error. Below is the line in question:
<apex:inputField value="{!inputObj[FieldName]}" required="false" rendered="true" style="width:50%"/>Getting the below error:.
Error: Value 'Provisional' cannot be converted from Text to DateTimeFieldName refers to the field API name. Any ideas on how to solve this would be very much appreciated.
~Ayan

I think the best solution would be to clear the selected value whenever you are changing the filter criteria (changing the fields)
Thanks for replying Nitish. However, since I'm using a dynamic binding in the object, not able to clear off the field. Any help on this will be greatly helpful.