BOI - Unable to edit QuantityBackOrdered in salesorder lines

SOLVED

Hello,

 

I am using Sage ERP 100 Version 2015 and using BOI to update QuantityBackOrdered on an existing sales order line item. The QuantityBackOrdered is not getting updated in MAS.  I am able to change it from the UI.

 

                liStatus = gpSalesOrderHeader.nSetKey(asSalesOrderNo)            <-----     returns 1

                lsError = gpSalesOrderHeader.sLastErrorMsg

                If liStatus = 0 AndAlso lsError <> String.Empty Then

                    'Error

                End If

 

                    liStatus = gpSalesOrderHeader.oLines.nMoveFirst()

                    lsError = gpSalesOrderHeader.sLastErrorMsg

                    If liStatus = 0 AndAlso lsError <> String.Empty Then

                        'Error

                    End If

                   

                    Do Until gpSalesOrderHeader.oLines.nEOF = 1

                            liStatus = gpSalesOrderHeader.oLines.nSetValue("QuantityBackordered", "3.00")         <----    returns 1

                            lsError = gpSalesOrderHeader.oLines.sLastErrorMsg                    <----           returns “Setup indicates that this option is not available on your system”           

                                If liStatus = 0 AndAlso lsError <> String.Empty Then

                                    'Error

                                End If

 

                                gpSalesOrderHeader.oLines.nWrite()

                            End If

 

                        liStatus = gpSalesOrderHeader.oLines.nMoveNext()

                        lsError = gpSalesOrderHeader.oLines.sLastErrorMsg

                        If liStatus = 0 AndAlso lsError <> String.Empty Then

                            'Error

                        End If

                    Loop            

                 liStatus = gpSalesOrderHeader.nWrite()                     <---             returns 1

                lsError = gpSalesOrderHeader.sLastErrorMsg                             

                If liStatus = 0 AndAlso lsError <> String.Empty Then

                    'Error

                End If

Any suggestions why this field is not getting updated through BOI?

 

Thank you in advance.

Parents Reply Children
  • 0 in reply to Kevin M
    Kevin's thought seems good to me.

    The other possibility I can think of is that some fields do not allow direct writes to them. For example, in inventory the BOI won't allow you to write directly into the quantity on hand fields (because then it would be out of balance with the transaction history).

    I note that in sales order entry, you cannot directly edit the back order field on the lines tab. Usually, I have to reduce the order quantity field to get rid of the back order quantity.
  • 0 in reply to Kevin M
    That was it. I changed the value to be numeric and it worked. Thank you Kevin.