Skip to Content
0

Di Add-on Adresses BP Error

May 09, 2017 at 09:04 AM

56

avatar image
Former Member

Hello experts ,

I am trying to create an add-on for updating addresses at business partner .It works fine for sap fields although in udfs i received the error 'invalid field name' . The name from udf is correct.The code is the following :

oBusPartner.Addresses.AddressType = SAPbobsCOM.BoAddressType.bo_BillTo
oBusPartner.Addresses.AddressName = rsBP.Fields.Item("IDAddress").Value.ToString
oBusPartner.Addresses.UserFields.Fields.Item("U_RegLocal").Value = rsBP.Fields.Item("U_RegLocal").Value.ToString

Please advice.

Kind Regards ,

Ifigenia Koumbarda

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

2 Answers

DIEGO LOTHER May 09, 2017 at 11:29 AM
0

Hi Ifigenia,

Replace this:

oBusPartner.Addresses.UserFields.Fields.Item("U_RegLocal").Value = rsBP.Fields.Item("U_RegLocal").Value.ToString

By this:

oBusPartner.Addresses.UserFields.Fields.Item("U_RegLocal").Value = rsBP.Fields.Item("U_RegLocal").Value;

Hope it helps.

Kind Regards,

Diego Lother

Share
10 |10000 characters needed characters left characters exceeded
Danilo Kasparian May 09, 2017 at 12:12 PM
0

Hi,

The problem is in your rsBP, you query is missing the field "U_RegLocal" or "IDAddress", double check if you have the field on the query you are running for rsBP.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Danilo Kasparian,

The problem is in the name of the field is the "U_Reglocal the correct...

Kind Regards,

Ifigenia Koumbarda

0

if it is solved, could you please close the question

0