cancel
Showing results for 
Search instead for 
Did you mean: 

How to set user defined fields via SAP B1 jco?

Former Member

I am trying to create A/R invoice in SAP Business One via Jco.

https://answers.sap.com/questions/50050/item-number-is-missing-specify-an-item-number-inv1.html

But I can't find a way to set user defined field.

Is there any solution?

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor

Hi Hao,

I usually work with SDK and C#, but I saw some sample codes with Jco. Did you try something like this:

invoice.getLines().getUserFields().getFields().item(java.lang.Object aIndex).setValue(java.lang.Object aValue)

At the parameter aIndex you can provide a string with the name of your udf field like "U_yourfield".

Hope it helps.

Kind Regards,

Diego Lother

Former Member
0 Kudos

Thank you!

It works fine in Java.

Answers (0)