Skip to Content
0
Former Member
Feb 04, 2014 at 06:44 PM

I want to update the UoM Price list through the DI API

441 Views

I'm trying to update an item UoMPrices but when I try to access the UoMPrices object I get an unhandled error: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I am using SAP B1 DI API 9.0 PL 07. Is there any known issue with the UoMPrices in the DI API or am I doing something wrong?



                            if (dvUoMPrices.Count > 0)
                            {


                                for (int j = 0; j < myItem.PriceList.UoMPrices.Count; j++)
                                {
                                for (int j = 0; j < myItem.PriceList.UoMPrices.Count; j++)
                                {
                                    myItem.PriceList.UoMPrices.SetCurrentLine(j);
myItem.PriceList.UoMPrices.SetCurrentLine(j);

UoMPrices.Count is the first part I try to access and that's where I get the unhandles error.