Passing Values Between Entities

Passing Values between Entites, remaining within the same window

Passing Values between Entities, opening in new window

There are a variety of reasons to pass values between entities.  It is PREFERABLE that you pass values using this method as opposed to entering global variables. Global variables should be avoided when possible.  When creating this link, the Hyperlink To field will contain the function call, and the Hyperlink Scripted pop-list needs to be set to true.

Hyperlinks and Xephr functions should always use single quotes ( ' ) instead of double quotes ( " ).

There will be times when a Xephr function will be set up to perform some action before opening a new page, such as when you are inserting a new record.  When this occurs, certain checks are done against the entity, such as checking to make sure that required fields are entered.  For this reason, you should enter the javascript to be performed first.  Then, you will put the code that is dependent upon the javascript executing successfully within a wrapper that checks to make sure that the javascript was successful before moving on.  

Inserts, saves, and deletes set a property called lastResult.  

The code looks like this

if ( lastResult)

   {

   //protected actions go here

   }

For example:

Insert();

if ( lastResult)

  {

  ShowEdit('CONTACT_MASTER.CONTACT_ID',$$CONTACT_MASTER.CONTACT_ID$$);

   }

Xephr is a registered trademark of NDS Systems, LC.

Copyright © 2007 NDS Systems LC.