You need to sign in to do that
Don't have an account?
Visualforce page trying to use inputfield id attribute to update a report on the page
Hi I am trying to create a simple VF page that displays a report.
I have created the report and I can get it on the page.
What I am trying to do next is that the user could update the report by selecting a value from inputfield (that is a lookupfield and is currently working) and then the report would update by using the value received from the inputfield by clicking the button Update Report.
Here is the current code:
<apex:page standardController="Case" showHeader="false" sidebar="false">
<apex:form >
<apex:inputField value="{!Case.Program__c}" id="programname">
</apex:inputfield>
<apex:commandButton value="Update Report" >
</apex:commandbutton>
<apex:iframe src="/00OG0000004HGdT?isdtp=mn&pv1=programname"/>
</apex:form>
</apex:page>
If using this way I get the following text on the report
"Program contains programname"
So it is not using the value in ID=programname but it is using the word programname to limit the search.
Well values cannot be refered by Id. In VF they are refered using merge fields
Check if the above works
Program equals a01G000000BBYHKIA5
ideas?
Command Button does not have action in it.
The default action is referesh the page an is working correctly on this part. The problem is the use if ID.
Seems like Program is a lookup field to another object.
Try this
Di not work,
<apex:page standardController="Case" showHeader="false" sidebar="false">
<apex:form >
<apex:pageBlock title="Select a program that that you are interested about"></apex:pageblock>
<apex:inputField value="{!Case.Program__c}" id="programname">
</apex:inputfield>
<apex:commandButton value="Show Report" >
</apex:commandbutton>
<apex:iframe src="/00OG0000004HJXJ?isdtp=mn&pv4={!Case.Program__r.Name}"/>
</apex:form>
</apex:page>
I tried that already and got the following error message when trying to save:
Error: Unknown property 'VisualforceArrayList.Name'
What is the child relationship name for Program lookup on Case ?
Sorry Neha I do not understand the question:
What is the child relationship name for Program lookup on Case ?
Please put in some details. We cannot guess by looking your code
It is a lookup field.
Your org seems to have improper naming convention and hence there is a conflict.
try this
<apex:iframe src="/00OG0000004HGdT?isdtp=mn&pv1={!Case.Program__r[0].Name}"/>
I dont think this will be of much help. I will recommend you to use a developr
If I examine the Object Program:
It has the following fields:
FIELD NAME
CreatedBy
LastModifiedBy
Owner
Name