Using StarfishETL Scripting Class Properties & Methods in C#

Using StarfishETL Scripting Class Properties & Methods in C#

See available StarfishETL Scripting Class Variables, Properties and Methods. To use these variables, properties and methods, you must append "Starfish." to the beginning of variable, property or method AND you must use the exact capitalization as found here and in the scripting class. 
Example using the PreviewMode Property and GetSetting and SaveSetting Methods:

  1. if (!Starfish.PreviewMode)
  2. {
  3. //Set the last run datetime for this user.
  4. Starfish.SaveSetting("Meetings-LRD-"+gUserID, DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss+00:00"));
  5. //Check to see if there are more users to process and if so, restart job.
  6. string uIDs = Starfish.GetSetting("UserIDs");
  7. //This Setting is set in the first Job and will restrict runs to only the Admin user.
  8. bool b = Starfish.GetSetting("AdminUserOnlyTesting_True_OR_False") == "True";
  9. if (b) {
  10. uIDs = "ADMIN";
  11. }
  12. if (runCnt < uIDs.Split(';').Length-1)
  13. {
  14. runCnt++;
  15. Starfish.GotoJob("e8566f56-69cd-4d65-8835-351de24795e3");
  16. Starfish.LogMessage("Count: "+ runCnt.ToString());
  17. } else {
  18. runCnt = 0;
  19. Starfish.GotoNextRow();
  20. }

  21. string quoteID = Starfish.XRefRead("SLXQuoteIDs",Starfish.OriginData["OPPORTUNITYID"].ToString());
  22. if (String.IsNullOrEmpty(quoteID))
  23. {
  24. quoteID = Starfish.SmartLookup("Quotes","id","[{\"foreignid_c\":\""+Starfish.OriginData["OPPORTUNITYID"].ToString()+"\"}]").ToString();
  25. }
  26. return quoteID;
  27. }

    • Related Articles

    • Scripting Class Object

      From within VBScript operations (ScriptedVariable, VBScriptProcedure, ScriptedField) in additional to normal VBScript functions, the developer has access to a custom “Starfish” class. The tables below define its usage. This class may also be used ...
    • Examples of using StarfishETL Class Functions In Javascript

      This code was used to lookup a value inside of SugarCRM using the Sugar REST connector. function scriptedField() { var res = ""; res = vals["Branch Name"]; if (res) { Starfish.LogMessage(res.toString()); } res = ...
    • StarfishETL Updater

      Update Wizard StarfishETL has a built-in updater. To start, click the Starfish button and select “Check for Updates” or launch StarfishUpdater.exe directly from within the Connect Creatio Admin installation path. NOTE: It is often times necessary to ...
    • StarfishETL iPaaS Logging Features and Settings

      StarfishETL iPaaS Logging Features and Settings StarfishETL iPaaS has a number of options for logging and monitoring integration activity. Logging is required at various stages of the integration mapping process, during the testing phase prior to ...
    • StarfishETL security features

      StarfishETL security features Compliance and data privacy · No data kept at rest on StarfishETL iPaaS servers · Data in motion is encrypted using HTTPS Infrastructure protection · StarfishETL iPaaS servers hosted on AWS · Servers are hosted on the ...