It can be useful for specific things like using Client Forms as custom dialogs.
The caller:
// Get action service IActionService actionService = ClientContext.ClientAPIService.GetService<IActionService>(); // Create action target object IClientTaskActionTarget clientTaskActionTarget = actionService.CreateActionTarget<IClientTaskActionTarget>(); clientTaskActionTarget.ClientTask = "MyCompany.PivotalProject.Client"; clientTaskActionTarget.ClientTaskMethod = "MyMethod"; clientTaskActionTarget.Parameters = new object[] { "parameter 1", "parameter 2", "parameter 3" }; // Create action and execute it. IAction action = actionService.CreateAction("MyActionName", ActionCommand.Show, ActionContent.ClientTask, clientTaskActionTarget); actionService.ExecuteAction(action);The calling method:
public void MyMethod(string p1, string p2, string p3){ // ... Do something }
No comments:
Post a Comment