Skip to Content
0

Deleting rows not supported for object Fiscal IDs for BP Master Data.

Jan 06, 2017 at 06:42 PM

264

avatar image
Former Member

Hi all...

Another problem with our integration here, and I hope you can help me again =D

We're sending a BP master data (Insert, Update, Delete) from one database to another database through XML.

First, before saving the XML, we're setting the XmlExportType like this:

oCompany.XmlExportType = BoXmlExportTypes.xet_ExportImportMode;

When the action is an update, we're doing something like this:

oBusinessPartners.GetByKey(_bpCode);
oBusinessPartners.Browser.ReadXml(_file, 0);

if (oBusinessPartners.Update() != 0)

On that point, oCompany.GetLastErrorDescription returns "Deleting rows not supported for object Fiscal IDs for BP Master Data."

This occurs in some cases, for example, when the BP has an address updated/removed or when the Fiscal Tax IDs has an update.

Now, how to solve this?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

DIEGO LOTHER Jan 09, 2017 at 01:12 AM
0

Hi Eduardo,

Maybe this is a bug or this resource is not provide in the DI API. I searched a little about it and I found a lot of thread with this error, when the users try to update the Business Partner via DTW, B1if and DI-API, the first two situations use DI API too.

I ran this code:

                BusinessPartners oBp = oCompany.GetBusinessObject(BoObjectTypes.oBusinessPartners);
                if(oBp.GetByKey("C00000003"))
                {
                    oBp.FiscalTaxID.SetCurrentLine(0);
                    oBp.FiscalTaxID.Address = "abc";


                    if(oBp.Update() != 0)
                    {
                        MessageBox.Show(oCompany.GetLastErrorDescription());
                    }
                }

and receive the same error that you mentioned. Then, I believe that is can be a bug, because the message is not compatible with the code.

Kind Regards,

Diego Lother

Share
10 |10000 characters needed characters left characters exceeded