'GetByKey() not working in some users in SAP B1

So I have this problem where I want to get DocEntry in OPCH table so I use the GetByKey(). The problem is that it works in all users except this particular user where GetByKey() returns false when I logged in to this specific user.

here is my code:

Sub SaveTransmit(ByVal tForm As SAPbouiCOM.Form)

     Dim tMatrix As SAPbouiCOM.Matrix = Nothing
     tMatrix = tForm.Items.Item("3").Specific

     Dim MyDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)

     Dim mtRow As Integer = tMatrix.RowCount

     For xxxt As Integer = 1 To mtRow
          tCheckE = tMatrix.Columns.Item("Col0").Cells.Item(xxxt).Specific
          tCheckB = tMatrix.Columns.Item("Col1").Cells.Item(xxxt).Specific 'Checkbox

          Dim koji As Boolean = tCheckB.Checked

          If koji = True Then
               If MyDoc.GetByKey(tCheckE.Value) Then
                    'some codes
               End if
          End if
     Next
End Sub

I don't know if this is a bug in SAP B1 or I need to configure this specific user.



Solution 1:[1]

This sounds like some kind of permission issue. Validate license ( prof vs limited ), data owner or general authorization.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mde