Пример #1
0
        public static EntityCollection GetTaxCodeMaster(WorkflowObjects wfObjects)
        {
            wfObjects.tracingService.Trace("Get Tax Code Started");
            QueryExpression query = new QueryExpression(Constants.TAXCODE_ENTITY);

            query.ColumnSet.Columns.Add(Constants.TAXCODENAME);
            query.ColumnSet.Columns.Add(Constants.TAXCODEID);
            return(wfObjects.service.RetrieveMultiple(query));
        }
Пример #2
0
        public static WorkflowObjects CrmService(CodeActivityContext context)
        {
            WorkflowObjects             WorkflowObj     = new WorkflowObjects();
            ITracingService             TracingService  = context.GetExtension <ITracingService>();
            IWorkflowContext            WorkflowContext = context.GetExtension <IWorkflowContext>();
            IOrganizationServiceFactory ServiceFactory  = context.GetExtension <IOrganizationServiceFactory>();
            IOrganizationService        Service         = ServiceFactory.CreateOrganizationService(WorkflowContext.UserId);

            //assign Objects to Class
            WorkflowObj.tracingService  = TracingService;
            WorkflowObj.workflowContext = WorkflowContext;
            WorkflowObj.serviceFactory  = ServiceFactory;
            WorkflowObj.service         = Service;
            return(WorkflowObj);
        }