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
arti7arti7 

Visualforce page of event

We are using custom page when create task and event. On this page, when user enter the whatid information into the field.

At first, user need to select object from drop down list, and then search the record user relate opportunities / accounts with the task. 

In our company, usually users relate their task with accounts. So I would like to set default value of drop down list as accounts than opportunities. 

If possible, could someone give me an advise for this solution. Thank you in advance.

 

Current source code is below for the reference.

 

------------------------------

<apex:inputField id="WhatId" value="{!event.WhatId}" required="true" onchange="statusChange()" rendered="{!viewWhat}" /> 

<apex:outputPanel layout="div" rendered="{!!viewWhat}" />