Skip to Content
0
Former Member
Jan 25, 2017 at 07:35 AM

Deleting a Business Partner Address Using DI SDK gives me Invalid Row Error

947 Views

Hello,

I'm trying to delete a business partner's address using DI SDKbp.Addresses.SetCurrentLine(address.LineNum);

Eventhough I got the LineNumber from the table CRD1 Field LineNum it's gives me an error that it's an invalid row number

below is a sample of my code:

BusinessPartners bp = comp.GetBusinessObject(BoObjectTypes.oBusinessPartners);

bp.GetByKey(cardcode);

bp.Addresses.SetCurrentLine(address.LineNum);

bp.Addresses.Delete();

int ret= bp.Update();

Thank You