locked
CRM filed mapping RRS feed

  • Question

  • Hi,

    My requirement is to ceate order in an opportunity entity.  So I'm using below code for generating the salesorder.

     GenerateSalesOrderFromOpportunityRequest req = new GenerateSalesOrderFromOpportunityRequest();
                req.OpportunityId = targetEntity.Id;
                req.ColumnSet = new ColumnSet(true);
                GenerateSalesOrderFromOpportunityResponse resp = (GenerateSalesOrderFromOpportunityResponse)_service.Execute(req);
                Entity SalesOrder = (Entity)resp.Entity;
                return SalesOrder.Id;

    Suppose if there are  100 fileds that are mapped from an opportunity to order .But how do i mention the request so that a particular filed not to map between those entities while creating an order from opportunity.

    Thanks

    Friday, July 5, 2013 11:35 AM

All replies

  • The mapping of fields between two entities is defined and controlled on the properties of the relationship between those two entities. In your example you are looking at the relationship between the Opportunity entity and the Sales Order entity.

    Open the Opportunity entity customization screen, go to the 1:N relationship section, and open the opportunity_sales_orders relationship. If you click on Mappings in the relationship screen that opens, you can see which fields are mapped between these two entities, and add/delete the mappings you want/don't want.

    Hope this helps.


    .NET Developer

    Friday, July 5, 2013 1:26 PM