You need to sign in to do that
Don't have an account?
Rahul Srivastava 44
User can't change prepopulate lookup field.
Onclick 'New opportunity' button under the account. We see 'Account Name' field prepopulate as in images below.
My requirement is while clicking lookup button for account selection. It should show only the existing account or user cannot change the current populating account. If a user selects another account it should throw error. How can we achieve this?
My requirement is while clicking lookup button for account selection. It should show only the existing account or user cannot change the current populating account. If a user selects another account it should throw error. How can we achieve this?
You can try something like this:
AND( NOT(ISBLANK(AccountId)), ISCHANGED(AccountId) )
Thanks,
Dhanya
Greetings to you!
Unfortunately, this is not possible to control in the standard UI. You can make a field read-only. You can write your own Visualforce page for the New Opportunity page. Something like this:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Hi Rahul
I agree with Khan Anas, this is not possible through standard. However, if you don't want to go to a VF Page based approach, your user will have search for the account (based on the accessibility rights) but you can still use the formula (modified version of the formula provided by Dhanya) as mentioned below:
AND(NOT(ISNEW()), NOT(ISBLANK(PRIORVALUE(AccountId))), ISCHANGED(AccountId) )
Hope this helps. Please mark as best answer if it does.
Cheers!!
Gaurav
Thanks, but it will work only I update the records not while I create the records.