You need to sign in to do that
Don't have an account?

How to call standard "new child record" window using JavaScript in VisualForce page
I'm trying to call the standard form to create a new related object in an overlay window, when loading a specific object detail page. That's how I would call the function:
<script> var previousOnload = window.onload; window.onload = function() { if (previousOnload) { previousOnload(); } alert('new related object...'); } </script>
How can I find the right function to call for any standard buttons? Like for example the "new" action on any related list? The action URL looks like this:
https://<domain>.lightning.force.com/lightning/o/<Related_Object>__c/new?count=5&nooverride=1&useRecordTypeCheck=1&navigationLocation=RELATED_LIST&uid=<RelatedID>&backgroundContext=%2Flightning%2Fr%2F<Parent_Object>__c%2F<ParentID>%2Fview
Thank you very much for your help.
Using URL hack you can pre-populate field values but not create any popup on when onload.
Thanks,