Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: Update user field in document

$
0
0

Hi Steve,

Is this a user form or a system form ?

 

                Dim oProductionOrder As SAPbobsCOM.ProductionOrders

                oProductionOrder = CType(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders), SAPbobsCOM.ProductionOrders)


oProductionOrder.GetByKey(ooProductionOrderDocEntry)


                If Not IsError2 Then 'OpprId

                    oProductionOrder.UserFields.Fields.Item("U_INFO").Value = "C"

                    lRetCode = oProductionOrder.Update()

                    If lRetCode <> 0 Then

                        oCompany.GetLastError(lErrCode, sErrMsg)

                        MessageBox.Show(sErrMsg)

                    End If



Please add the underlined code.

What is IsError2 ?

Also what is IsError ?

 

oRec2.DoQuery("UPDATE [@PROD_ORDER] set Code = 'C' where DocEntry = '" + oProductionOrderDocEntry + "'")


The Code field in UserTable is a unique field.

You may not have duplicate value of C across all records in the table.



Regards

Edy



Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>