EndJob ( String )
|
Cancels the Job execution immediately, ending with an error message as passed into the String param.
Other Class Methods
Method Name
|
Description
|
LogMessage ( String, MsgBoxStyle )
|
Appends a custom message to the Log which will always be displayed (even if Logging Level is set to None). Message is the passed in String parameter. Second parameter is a valid MsgBoxStyle (vbInformation, vbQuestion, vbExclamation, vbCritical)
|
GetFields ( String )
|
Executes a SQL SELECT statement returns all field values from the first row, comma-delimited. VBScript Split() function may be used to convert to an array within your function. Can improve performance when needing multiple fields from a single table.
|
ExecScalar ( String, String(Optional) )
|
Executes a SQL SELECT statement on the Destination database. Returns the first column of the first row returned by the query. Compatible with OLE DB destinations.
There is an optional parameter to query the origin. To query the origin, use the second parameter of "ORIGIN"EX: ExecScalar("select id from company", "ORIGIN")
|
ExecScalarCache ( String )
|
Same as ExecScalar, except that results are cached and before a query is executed, a search is performed on a locally-stored set of results to prevent execution of identical queries, thus boosting performance. Should only be used for queries where multiple identical queries may be run (such as looking up user id’s or picklist values) – otherwise could consume resources needlessly.
|
ExecSQL ( String, String(Optional) )
|
Executes a non-query statement, such as UPDATE or DELETE against the destination database. Returns number of rows affected. Compatible with OLE DB destinations. First parameter is SQL Statement. Second parameter is optional connection to run again. "DESTINATION" is default, other option is "ORIGIN".
|
SendEmail ( String, String, String )
|
Sends an email directly from within the VBScript function/procedure.
Parameters:
To_Addr – Email Recipient Address
Subject – Subject of the Email
Body – Body of the Email
|
ParseName ( String, String )
|
Parses as string containing a person’s name, and returns the part of the name requested.
Parameters:
String – Input String containing entire name
Part – Part of the name to return. Valid parts are “Title”,”First”,”Last”,”Middle”,”Pedigree”,”Degree”.
|
RemoveIllegalXMLCharacters ( String )
|
This function removes Illegal XML Characters from a string. This function can be used on a string before inserting it into the Target to resolve the "error in msg parsing: XML error parsing SOAP payload on line 32: Invalid character" error.
|
GetStageValue ( Integer, String)
|
Returns the destination value used on a previous stage.
Integer – Index number of the stage, 0-based.
String – Field name of the value from this stage to return.
For some of the CRM Native API’s (SData, Microsoft), generated ID’s will be automatically stored in a field named “Key”.
|
SmartLookup ( String, String, String, [Boolean], [String], [String] )
|
Performs a lookup against the destination database, and returns one field value based on supplied filter.
String – Table to perform lookup in
String – Name of field to return
String – Filter code (such as Where clause, not including keyword “Where”)
Boolean – Default False. Enable cache for this lookup.
String – Default Blank. Order By
String – Default "DESTINATION". Use "ORIGIN" to query the Origin.
|
SmartQuery ( String, [String], [String])
|
Performs a lookup query against the destination database, returns all columns and all rows from query as a multi-dimensional array.
String – Table to perform the query in
String – Filter code
String – Default All Columns. Comma-separated list of columns to return
If both last 2 parameters are left blank, SmartQuery performs a full operation as specified in the first parameter.
|
BlackbirdMessage ( String, String, String, String, [String], [String] )
|
Send a Blackbird Alert message (server is specified in Web.config)
String – Message Title
String – Message Text/Body
String – To (user or group to receive message)
String – URL where message link will forware to
String – Icon, Default “Info”. Choose from: Info, Warning, Error, Question, Star, Check, Search, Globe, Phone, Users, Lock, Task, Bell, Cellphone, Envelope, Calendar, Flag, Charts, Calculator, Fax
String – System, Default <blank>. Name of External System for use with To-ID matching.
|
IsEmailValid ( String )
|
Returns True if supplied email address is in a valid email format; otherwise false.
|
FormatDate ( String, String )
|
Returns date in supplied format.
String – Date to format
String – Format String
Example:
newdt = FormatDate(olddt, “yyyy-MM-dd hh:mm:ss”)
|
File Class Methods
Method Name
|
Description
|
MoveFile ( String, String )
|
Moves a file on the server.
String – From filename path
String – To filename path
|
CopyFile ( String, String )
|
Copies a file on the server.
String – From filename path
String – To filename path
|
DeleteFile ( String )
|
Deletes a file on the server.
String – Filename path
|
ReadFile ( String )
|
Reads a file in text mode and returns the contents as a string.
String – Filename path
|
WriteFile ( String, String )
|
Writes the supplied contents to a file in text mode. Entire file is overwritten.
String – Filename path
String – contents to write to the file
|
XREF Class Methods
Method Name
|
Description
|
XrefInitWrite ( String )
|
Initializes a cross-reference file for writing. If file exists, new data will be appended to it.
String – cross-reference name
|
XrefInitRead ( String )
|
Initializes an existing cross-reference for reading. This reads all ids into memory so they will be available within your job.
String – cross-reference name
|
XrefWrite ( String, String, String )
|
Writes a new ID reference entry to an initialized file.
String – cross-reference name
String – ID 1 (the ID you’ll look up by in future jobs)
String – ID 2 (the ID you’ll want returned by future lookups)
|
XrefRead ( String, String )
|
Reads an ID entry from an initialized file. (Returns ID 2 from above)
String – cross-reference name
String – ID 1
|
MS Dynamics CRM Specific Methods
Method Name
|
Description
|
GetMCRMPicklistValue( String, String, String )
|
Returns the integer value for a supplied picklist string.
String – Entity for the picklist (“account”)
String – Fieldname of the picklist (“accounttype”)
String – Value for the picklist (“Prospect”)
|
MCRMSetRelationship ( String, String, String, String, String )
|
Sets a relationship between two entites.
String – Relationship Name
String – Entity 1 Name
String – Entity 1 ID
String – Entity 2 Name
String – Entity 2 ID
|
SugarCRM (SOAP) Specific Methods
Method Name
|
Description
|
SugarSetRelationship (String, String, String, String )
|
Sets a relationship between two modules. Returns True or False based on the success of creating a relationship.
String – Module 1 Name
String – Module 1 ID
String – Module 2 Name
String – Module 2 ID
|
SugarSetRelationshipv4 (String, String, String, String, Number(Optional) )
|
Sets a relationship between two entities, compatible also with custom modules. Returns True or False based on the success of creating a relationship. Also able to remove a relationship between two entities with the optional fifth parameter.
String – Module 1 Name
String – Module 1 ID
String – Relationship Name
String – Module 2 ID
String – [Delete] (Optional) – Default is 0 (false). Set to 1 (true) to Delete a relationship.
|
SugarGetRelationships ( String, String, String )
|
Gets comma-separated a list of ID’s related to an entity
String – Module 1 Name
String – Module 1 ID
String – Module 2 Name
|
SugarGetRelationshipsv4 ( String, String, String )
|
Gets comma-separated a list of ID’s related to an entity
String – Module 1 Name
String – Module 1 ID
String –Relationship Name
|
Email (IMAP) Specific Methods
Method Name
|
Description
|
MoveIMAPMessage ( String )
|
Moves the current email message to the specified folder on the server.
String – Name of IMAP folder to move message to
|
Conversion Methods
Method Name
|
Description
|
ConvertRTFToText ( String ), ConvertHTMLToText ( String ), ConvertBase64ToBytes ( String )
|
Converts the String supplied.
|
SQLite Class Methods
Method Name
|
Description
|
SQLiteInsert
|
Returns boolean, true if successful: b = SQLiteInsert("test_table", "field1,field2", "'@@ORG:DirectoryRelative@@','@@ORG:Name@@'")
|
SQLiteSelect
|
Returns a multi-dimensional array: b = SQLiteSelect("test_table", "field1,field2", "field2='@@ORG:Name@@'")
EX:
if UBound(b)>-1 then 'there is data
logmessage b(0,0)
logmessage b(0,1)
else
logmessage "no data"
end if
|
SQLiteUpdate
|
Returns boolean, true if successful: b = SqliteUpdate (table, update_values, where)
EX: SqliteUpdate ("blah", "textfield1='hey', numfield3=45", "name=@@ORG:Name@@")
|
SQLiteDelete
|
Returns boolean, true if successful: b = SQLiteDelete("test_table", "field2='@@ORG:Name@@'")
|
JSON Methods
Method Name
|
Description
|
ParseJson( String )
|
Loads the passed in string into the JSON parser.
|
GetJSON( String, [String], [String], [String], [String], [String], [String], [String], [String] )
|
Returns a given section from the supplied JSON.
|
JSONArrayCount( )
|
Returns the number of elements within the JSON array loaded using ParseJson.
|
|