locked
How to delete Contract Line by using c# RRS feed

  • Question

  • Hi fri,

              I want to delete contract line by using c#. I can find the delete the contract but i can't find how to delete contract line using with sdk. I'm using dynamic entity execute method.

             Kindly please share your knowledge to me.

     

    Regards,

    Yukon

     


    Make Simple & Easy
    Wednesday, December 14, 2011 2:15 PM

All replies

  • I would use service.delete rather than execute

     

    In CRM 4

     

     crmService.Delete(salesPersonEntityName, salespersonID);

     

    you pass the entity name e.g. ("account") and the guid of the sales person.

     

    in fact this is the same for CRM 2011

    the service is 

    IOrganizationService

     

     service.Delete(Contract.EntityLogicalName, guid);

     


    Ben Hosking
    Check out my CRM Blog
    Linked-In Profile
    Follow Me on Twitter!
    • Proposed as answer by The Hosk Wednesday, December 14, 2011 3:00 PM
    Wednesday, December 14, 2011 2:58 PM