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

Custom Button

Q: I creat custom button on Opportunity name:display
if click on Display 1.if any contacts is there went to contacts view page
                    contacts show error msg

How to do it.
Best Answer chosen by NNR
Deepak Kumar ShyoranDeepak Kumar Shyoran
First select the Javascript as a execute behaviour and then put below code in javascript area.
var records = {!GETRECORDIDS($ObjectType.Opportunity)};

if (records[0] == null)
alert('Please select some records') ;
else'/003/o') ;

You can modify above code a bit to meet your requirement.