on 07-27-2018 3:50 PM
Hi all,
i need a method to get the default G/L accounts when selecting an Item.
Is there an SDK method to get this information?
I'm Trying to use the GetAdvancedGLAccount method from CompanyService using the following code
Dim objCompanyService As CompanyService
Dim objGLAccountParameters As AdvancedGLAccountParams
Dim objGLAccountReturnParams As AdvancedGLAccountReturnParams
Dim strCardCode As String = ""
Dim strAccount As String = ""
Dim oItem As SAPbobsCOM.Items
Try
objCompanyService = oSapB1Addon.oCompany.GetCompanyService()
objGLAccountParameters = oSapB1Addon.oCompany.GetCompanyService.GetDataInterface(CompanyServiceDataInterfaces.csdiAdvancedGLAccountParams)
strCardCode = Trim(oForm.DataSources.UserDataSources.Item("uCardCode").ValueEx)
objGLAccountParameters.AccountType = InventoryAccountTypeEnum.iatExpenses
objGLAccountParameters.BPCode = strCardCode
objGLAccountReturnParams = oSapB1Addon.oCompany.GetCompanyService.GetDataInterface(CompanyServiceDataInterfaces.csdiAdvancedGLAccountReturnParams)
objGLAccountReturnParams = objCompanyService.GetAdvancedGLAccount(objGLAccountParameters)
strAccount = objGLAccountReturnParams.AccountCode
Return True
Catch ex As Exception
Return False
End Try
but when i call
objGLAccountReturnParams = objCompanyService.GetAdvancedGLAccount(objGLAccountParameters)
i got an error saying "Requested action not supported by this object. What could be the problem? COuld it be that it isn't activated the advanced G/L Account managent in the company? What alternative method I could use in this case?
Thanks in advance.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.