Thank you, Vassil. I have seen the information you posted, however I have two needs.
1) I cannot get the default workflow to run from my code.
2) I will also want to modify the content of the email, so that the notes about the state change are in the email.
Please see the code I am using for the custom submit button. Notes are normally saved for Rejected items only, but I am saving a note for Awaiting Approval, Rejected and Published. My "UnitEditable" field is controlling the ability to modify drafts on many other content types which act as multiple children to the one for which I am trying to create notifications.
The lines which are commented were not working for module builder data.
Thank you, Scott
public string SubmitBudget(DynamicContent currentBudgetItem, string notes)
if (currentBudgetItem.ApprovalWorkflowState != "AwaitingApproval")
var master = dynamicModuleManager.Lifecycle.GetMaster(currentBudgetItem) as DynamicContent;
var checkOutBudgetItem = dynamicModuleManager.Lifecycle.CheckOut(master) as DynamicContent;
ILifecycleDataItem checkInCourseItem = dynamicModuleManager.Lifecycle.CheckIn(checkOutBudgetItem);
dynamicModuleManager.Provider.ApplicationName, "AwaitingApproval", null,
//send item for approval
//var holder = new Dictionary<
//WorkflowManager.MessageWorkflow(master.Id, budgetType, dynamicModuleManager.Provider.ToString(), "SendForApproval", false, holder);
return apmAlerts.Success("The current budget has been submitted for approval.");
return apmAlerts.Warning("The current budget was already awaiting approval.");
catch (Exception e)
return apmAlerts.Error("There was a problem submitting this budget for approval.<
/>" + e.ToString());