To get the proper URL for a related object in the “Used on” panel, you can use the Link() method of the object. This will return the URL for the object’s “view” page, which you can then use to redirect the user.
For example, if your artist object has a Link() method that returns the correct URL for the object’s view page, you can use the following code to redirect the user to the object’s edit page:
You can then use this $editURL variable to redirect the user to the object’s edit page.
Alternatively, you can use the CMSEditLink() method provided by the CMSPageEditController class to get the edit URL for a page or data object. This method requires the ID of the object as a parameter, and returns the edit URL for the object.