I created a custom button(URL) on Opportunity object, that redirects me in a visualforce page to create a new Task. I am trying to get the values of parameters from URL to per-populate some values from opportunity, but it is not working. I am not using controllers. Here is the URL :
/apex/TaskPage?who_id={!Opportunity.AccountId}&what_id={!Opportunity.Id}&retURL={!Opportunity.Id}
Here is my visualforce page:
<apex:page standardController="Task">
<apex:form >
<apex:pageBlock title="New Task">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="2" title="Task Information">
<apex:inputField value="{!Task.OwnerId}" id="userName" required="true"/>
<apex:inputField value="{!Task.Status}"/>
<apex:inputField value="{!Task.Subject}"/>
<apex:inputField value="{!Task.WhatId}"/>
<apex:inputField value="{!Task.ActivityDate}"/>
<apex:inputField value="{!Task.WhoId}"/>
<apex:inputField value="{!Task.Priority}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Description Information">
<apex:inputField value="{!Task.Description}"/>
<apex:inputField value="{!Task.Test__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
Please, can anyone help me? Thanks