This function can be used to identify whether the script being executed is from Windows or any Web application so as to determine if anything in the script depends upon Windows or Web.
2. PaperSave.ShowMessage(Message, Title)
3. PaperSave.ExecuteSQLServerQuery(ConnectionString, CommandText)
This function can be used to execute SQL query on a specified server depending upon the Connection String supplied. An SQL query can be any valid SQL statements with SELECT, INSERT, UPDATE or DELETE. For SELECT statements it will return an Array which can be used on the caller script. To know more about PaperSave.ExecuteSQLServerQuery, click here and refer the respective section.
This function can be used in a PreScript to prohibit the Event from getting executed if it does match some condition. One need to pass the value for "ShowCancelMessage" parameter while using this function, the value can either be set to "True" or "False". When the value of the Parameter is set to "True" in that case it will display a message box as shown below, in case where the value of the parameter is set to "False" then it will not display the said message box.
var xVendorRows = ;
xVendorRows = PaperSave.ExecuteSQLServerQuery("Provider=SQLOLEDB;Data Source=.\\development;Initial Catalog=TWO;Trusted_Connection=Yes;","Select VENDNAME, ZIPCODE from PM00200 where VENDORID like 'ACETRAV%'");
xVendorRows = PaperSave.ExecuteSQLServerQuery("Data Source=.\\development;Initial Catalog=TWO;Integrated Security=True;MultipleActiveResultSets=True","Select VENDNAME from PM00200 where VENDORID like 'ACETRAV%'");
for(var i=0;i< xVendorRows.length;i++)
vendorName = xVendorRows[i].VENDNAME;
if(profile.Amount == null || profile.Amount <= 0)
PaperSave.ShowMessage("Please enter a value for Amount profile field.","PaperSave");
|·||You can use Globals or globals or GLOBALS for Global variables. Also you can use different cases for add (Add or ADD or add), exists (Exists or EXISTS) and getVal (GETVAL or getval or Getval or GetVal) functions.|
|·||You can use Profile or PROFILE or profile for using profile fields.|
|·||For ScriptResult (i.e. statements like ScriptResult, CancelScript etc. in PreScript) you can use Scriptresult or SCRIPTRESULT or scriptresult or scriptResult.|
|·||Also you can use different functions with different casing as mentioned above.|