Using Connect Creatio Scripting Class Properties & Methods in C#

Using Connect Creatio Scripting Class Properties & Methods in C#

See available Connect Creatio 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:

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

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

    • 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 “Connect Creatio” class. The tables below define its usage. This class may also be ...
    • Examples of using Connect Creatio 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 = ...
    • Creatio Connect iPaaS Logging Features and Settings

      Creatio Connect iPaaS Logging Features and Settings Creatio Connect 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 ...
    • Writing to a local CSV from the Creatio Connect Cloud

      Even though more and more services are moving to cloud-based solutions, often times we still need to interface to on-premises software using CSV files. To do this using the Creatio Connect iPaaS system, you'll need to set up a Creatio Connect Ray. A ...
    • Connect Creatio security features

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