Selam dostlar!
Bir alanı null hale getirmek istediğimizde aşağıdaki yöntemi kullanmak durumundayız.(Unsupported bir yöntem olan db'den bu işi halletme işini söylemeyin bana! :))
account acc = new account();
acc.accountid = new Key(new Guid("0AECA2BF-787A-48A2-A8DA-1369F0104EFF"));
Lookup lookup = new Lookup();
lookup.IsNull = true;
lookup.IsNullSpecified = true;
acc.primarycontactid = lookup;
crmservice.Update(acc);
Yukarıdaki blogun yerine aşağıdaki gibi bir yapı kullanabilirsiniz.Cok daha pratik.
account acc = new account();
acc.accountid = new Key(new Guid("0AECA2BF-787A-48A2-A8DA-1369F0104EFF"));
acc.primarycontactid = Lookup.Null;
crmservice.Update(acc);
Thanks : A.Butenko