Hi Brian,
Have you had a chance to take a look at the developers guide article on
developing custom action steps? It may give you the information you are looking for - if not, please let me know.
One option for passing the values could be writing/reading from a custom table:
private bool GetAndUpdateCustomTableItem()
{
// Create new Custom table item provider
CustomTableItemProvider customTableProvider = new CustomTableItemProvider(CMSContext.CurrentUser);
string customTableClassName = "customtable.sampletable";
// Check if Custom table 'Sample table' exists
DataClassInfo customTable = DataClassInfoProvider.GetDataClass(customTableClassName);
if (customTable != null)
{
// Prepare the parameters
string where = "ItemText LIKE N'New text'";
int topN = 1;
string columns = "ItemID";
// Get the data set according to the parameters
DataSet dataSet = customTableProvider.GetItems(customTableClassName, where, null, topN, columns);
if (!DataHelper.DataSourceIsEmpty(dataSet))
{
// Get the custom table item ID
int itemID = ValidationHelper.GetInteger(dataSet.Tables[0].Rows[0][0], 0);
// Get the custom table item
CustomTableItem updateCustomTableItem = customTableProvider.GetItem(itemID, customTableClassName);
if (updateCustomTableItem != null)
{
string itemText = ValidationHelper.GetString(updateCustomTableItem.GetValue("ItemText"), "");
// Set new values
updateCustomTableItem.SetValue("ItemText", itemText.ToLowerCSafe());
// Save the changes
updateCustomTableItem.Update();
return true;
}
}
}
return false;
}
Thanks,
Sandro