Exemple #1
0
        protected override void ExecuteWorkflowLogic()
        {
            var quoteCloseRequest = new CloseQuoteRequest()
            {
                Status     = QuoteStatus.Get(Context.ExecutionContext),
                QuoteClose = new Entity("quoteclose")
                {
                    ["subject"]     = Subject.Get(Context.ExecutionContext),
                    ["quoteid"]     = Quote.Get(Context.ExecutionContext),
                    ["actualend"]   = CloseDate.Get(Context.ExecutionContext),
                    ["description"] = Description.Get(Context.ExecutionContext)
                }
            };

            Context.UserService.Execute(quoteCloseRequest);
        }
Exemple #2
0
        protected override void ExecuteWorkflowLogic()
        {
            var convertQuoteToSalesOrderRequest = new ConvertQuoteToSalesOrderRequest()
            {
                ColumnSet             = new ColumnSet("salesorderid"),
                QuoteCloseDate        = CloseDate.Get(Context.ExecutionContext),
                QuoteCloseDescription = Description.Get(Context.ExecutionContext),
                QuoteCloseStatus      = QuoteStatus.Get(Context.ExecutionContext),
                QuoteCloseSubject     = Subject.Get(Context.ExecutionContext),
                QuoteId = Quote.Get(Context.ExecutionContext).Id
            };

            var convertQuoteToSalesOrderResponse =
                (ConvertQuoteToSalesOrderResponse)Context.UserService.Execute(convertQuoteToSalesOrderRequest);

            SalesOrder.Set(Context.ExecutionContext, convertQuoteToSalesOrderResponse.Entity.ToEntityReference());
        }