More thoughts on adding Action buttons to Find Screens

1 minute read time.
SyntaxHighlighter.config.clipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'; SyntaxHighlighter.all();
I wrote an article previously that showed how the action buttons on the system search screens set a hidden value in the form. This is the "TargetAction" field.

For example the "New Document" action button could be built using the following code:


strURL = "javascript:document.EntryForm.TargetAction.value = 'NewDocument'; 
document.EntryForm.submit();" 
var strMergeButton = eWare.Button("NewDocument", "new.gif", strURL); 


The other values used by the system search screens are:
  • NewDocument
  • NewCommunication
  • SendEmail
  • ExportToFile

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.