Skip to Content
0
Former Member
Feb 22, 2006 at 09:50 AM

Update User Defined Fields in ITM1

227 Views

I don't see how to update the UDF I added to the ITM1 table. I added two Fields: "U_I001" and "U_I002"

I have an Items object to update ITM1/Price which works perfectly,

I can't acces my UDF from that table, which object am I supposed to use?

here is my code:

oItems = (SAPbobsCOM.Items)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.oItems);
				
oItems.GetByKey("A001");
oItems.PriceList.SetCurrentLine(0);	

//This line works ok				
oItems.PriceList.Price = 'MyUpdatedPrice;

//These lines don't seem to refer to the right fields
oItems.PriceList.UserFields.Fields.Item("U_I001").Value = 'MyNEwValue1;
oItems.PriceList.UserFields.Fields.Item("U_I002").Value = 'MyNewValue2;
oItems.Update();