cancel
Showing results for 
Search instead for 
Did you mean: 

Error While Updating Receipt from Production in SAP B1 using DI API

dinesh_s1
Participant
0 Kudos

Hi,

I need to update an UDF Field in Receipt from Production.but while updating i am getting the error "the specified resource name cannot be found in the image file".

Here is my DI API Code :

SAPbobsCOM.Documents inventoryTransfer = (SAPbobsCOM.Documents)Global.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry);
if (inventoryTransfer.GetByKey(208))
{
// Update the user-defined field value
inventoryTransfer.UserFields.Fields.Item("U_NoPkg").Value = "1234";

if (inventoryTransfer.Update() == 0)
{
Global.oApplication.StatusBar.SetText("Updation Success : ...", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
}
else
{
string error = Global.oCompany.GetLastErrorDescription();
Global.oApplication.StatusBar.SetText("Updation Failed : " + error + "...", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
}

Kindly Suggest for the solution.Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Shalini_Singhal
Associate
Associate
0 Kudos

Hi dinesh_s1,

This issue might be due to some database corruption.

If you want to get it investigated, kindly create an incident for SAP Business One Support Team under the component SBO-SDK-DI.

Kindly mention the link of this discussion while creating the incident.

Kind regards,

Shalini Singhal

SAP Business One Support

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi  dinesh_s1,

The error means that there is something which does not exist.

At which line are you getting the error?

Can you make sure that the UDF (U_NoPkg) which you are trying to update exists and is in same case letters as in the database?

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

dinesh_s1
Participant
0 Kudos
we are getting error in this line inventoryTransfer.Update()...and the UDF field(U_NoPkg) is correct