cancel
Showing results for 
Search instead for 
Did you mean: 

Updating document via SAP B1 SDK

0 Kudos
354

Hi,

I'm trying to set value for UDF in Marketing document:

oDoc.UserFields.Fields.Item("U_CostPeriod").Value = cb_CostP.Value;

result =oDoc.Update();

As result I get value '-5006' and document is not updated successfully, value is not set.

When I try to set the same value to the same doc via UI - everything is OK.

What does value '-5005' mean? What wrong with updating docs via SDK?

View Entire Topic
0 Kudos

Thank you ankit.chauhan, I have used oCompany.GetLastErrorDescription()

and received following error description: "The requested action is not supported for this object"

But I still can not understand what wrong. Why the same updating works well via UI but does not work via SDK?