For example the "New Document" action button could be built using the following code:
The other values used by the system search screens are:
This TargetAction hidden field is also found in ASP search pages for custom entities like "Project" that are built out of a screen block of type 'search'.
BUT for a Custom Entity it is probably easier to rebuild the action behaviour using ASP pages that trying to hijack the system behaviour.
Note: It is perfectly possible when reconstructing search pages for default entities like 'Person' or 'Company' to use the existing screen blocks. Blocks like 'CompanySearchBox' may exist in Meta Data but they also have some "dll Magic" associated with them - for example they include use the keyword search box. You can dynamically reference these screens in an ASP page but you will see that they do not include the TargetAction field and so will not respond to the rebuilds of the search screen Actions. You will then have to rebuild the actions using calls to your own ASP pages.