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

JAVASCRIPT AJAX Custom button ,related list

I created a custom button which executes JAVASCRIPT, Depending on whether a detail is present i need to display error message/redirect user.
Is there a way to get the list of related list in JAVASCRIPT without writing a query.
Say for eg;if my JS is on Lead object if i say = "{!Lead.Id}";
i could get ID directly Similar is there a way to get related lists?
[i could also create a rollup summary and check for this,but want to avoid creation of fields]