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
PatcsPatcs 

How to disable/ enable the Lookup Field Dynamically

Hi

 

In my organization I have a scenario that, in Opportunity when the TYPE field = "Existing" then the Account(Lookup) Field should be enabled, otherwise it should be in disable state.


Can any one please help on this....

 

Thanks!!!

S PraveenS Praveen

Hi,

 

First of all i want to know that u r using visual force page or standard page,if u r using  VF page then for that inputfield there will be  one variable 'disable'->boolean type for this u should assign a variable, so for that variable u should use controller that when it should disable and when it should be enable (setting to true or false).

 

 

Regards,

Praveen Sappati

PatcsPatcs

Hi praveen

 

Thanks For your reply. It is in standard Page, I am not using any visualForce Page.


Thanks!!!

S PraveenS Praveen

Hi,

 

lookup field should be enable or disable in the new page and edit page or in view page..

 

Regards,

Praveen Sappati

PatcsPatcs

Hi Praveen

 

It should be in New page and Edit Page of opportunity

 

Thanks!!!

S PraveenS Praveen

Hi,

 

Then you  have to use Visualforce page. there is no other solution

 

Regards,

Praveen Sappati

PatcsPatcs

Hi Praveen

 

If it is in view page how will we do?

 

Thanks!!!

S PraveenS Praveen

Hi,

 

If it is in view page based upon workflow field update we can assign different pagelayout by removing lookup field.It is some what difficult that we have to create record type

 

 

Regards,

Praveen Sappati.

PatcsPatcs

Hi Praveen

 

Thanks for your Reply.