I'm using Microsoft Dynamics CRM 2011.......
When User call the Create Sales Order button from a Quote, then the CRM creates a new Sales Order with same details (rows).
I want to filter some of these rows using plugins and C# (PreSalesOrderCreate?). For example: I want to exclude the rows which have a custom flag (Yes/No option set) "exclude" set to true.
Is there any method to do this?
Thank you very much
I dont think you will be able to change how crm creates Sales Order details from Quote Details. You wont be able to do in Pre-Create as the sales order rows wont be available at that point.
There are few ways you could achieve what you want.
Yould create a custom workflow activity that Converts the Quote to Order using - ConvertQuoteToSalesOrderRequest
In the same CWA, once the ConvertQuoteToSalesOrderRequest is completed, you can get the order and order line items and remove the ones you do not need based on the custom flag. If the custom flag is not in the Order line items, you can definitely add to Order Line item and map it from quote detail.
You can then call this CWA in an Action/Wofklow and execute that on a custom Create Order button on the form.
Business Applications communities