Hi. I just started as CRM developer at a college. We use Ellucian, which is CRM for higher ed built on MS Dynamics. Trying to test custom workflows. Code clearly has output argument. just a string for testing:
using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; using Microsoft.Xrm.Sdk.Workflow; using System; using System.Activities; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WheatonPluginDelta.Activities { public class AppointmentPopulateSpouse1 : CodeActivity { [RequiredArgument] [Input("Person")] [ReferenceTarget("contact")] public InArgument PersonRef { get; set; } [RequiredArgument] [Input("Appointment")] [ReferenceTarget("appointment")] public InArgument AppointmentRef { get; set; } [Output("output string")] public OutArgument MyOutput { get; set; } protected override void Execute(CodeActivityContext executionContext) { ITracingService tracingService = executionContext.GetExtension(); IWorkflowContext workflowContext = executionContext.GetExtension(); IOrganizationServiceFactory serviceFactory = executionContext.GetExtension(); IOrganizationService orgService = serviceFactory.CreateOrganizationService(workflowContext.UserId); EntityReference personRef = PersonRef.Get(executionContext); EntityReference appointmentRef = AppointmentRef.Get(executionContext); var appointment = new Entity("appointment", appointmentRef.Id); var spouse = orgService.Retrieve("contact", personRef.Id, new ColumnSet("spousesname")); if (spouse["spousesname"] != null) { MyOutput.Set(executionContext, spouse["spousesname"]); } else { MyOutput.Set(executionContext, "no spouse found"); } } }
But once I implement on a workflow, my inputs will show up on the process designer, but not my output:
Like, when I click on properties for the second step:
Any help would be greatly appreciated!