locked
Update Parent Entity's associate child entities in Ms Crm by c# RRS feed

  • Question

  • Hello guys ,

    Our business uses ui to show customer details and list of phone no

    User can add as many phone nos as he wishes to.
    If user want to delete existing phone and add new ones , he can.

    This data is linked to Ms Crm Databse so customer is parent entity and phone no is associated child entity.

    If user updates phone no as below :

    Old Customer Phone Nos : 111, 222 ,333 
            New List of Phone No : 111 , 444  

    Case 1) I want to overwrite new list of phone no to old list.
    Insert : 444, Delete : 222 ,333 Keep 111 untouched

    Case 2) But in our c# code
    We retrieved all phone no by linq
    We Deleted all old phone no list using Delete method of Crm Sdk
    then inserts new phone no 111 , 444 using Create method of Crm Sdk

    Is there any method provided by crm sdk that will automatically do Case 1)
    Or any other way to do this

    Case 2) will unneccesarily delete 111 phone no each time.
    I want to avoid delete - insert of same data in database

    Also My requirements is 
    I do not want to check this manually whether
    oldphoneno = newphoneno

    If anyone has some idea , I would really appreaciate it

    Thanks,
    Om
    • Edited by Om Ms crm Wednesday, August 6, 2014 11:34 AM
    Wednesday, August 6, 2014 11:31 AM