on 12-20-2016 11:51 AM - last edited on 02-03-2024 5:07 PM by postmig_api_4
Good day, i need help.I learned help, but did not understand how i can update the data in this table using SDK.
Hi Pavel,
Use the AssetDocumentService to access this object
Dim oCS As SAPbobsCOM.CompanyService = oCompany.GetCompanyService
Dim oAS As SAPbobsCOM.AssetDocumentService = oCS.GetBusinessService(ServiceTypes.AssetRetirementService)
Dim oAssetDoc As SAPbobsCOM.AssetDocument = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocument)
Dim oAssetDocParm As SAPbobsCOM.AssetDocumentParams = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocumentParams)
Dim oAssetLine As SAPbobsCOM.AssetDocumentLine = Nothing
'Create a New Asset
oAssetDoc = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocument)
oAssetDoc.DocumentType = AssetDocumentTypeEnum.adtScrapping
oAssetLine = oAssetDoc.AssetDocumentLineCollection.Add
oAssetLine.AssetNumber = "MyAsset"
oAssetLine.Quantity = 1
oAssetDocParm = oAS.Add(oAssetDoc)
'Get an existing AssetDoc 18 to update
oAssetDocParm As SAPbobsCOM.AssetDocumentParams = oAS.GetDataInterface(AssetDocumentServiceDataInterfaces.adsAssetDocumentParams)<br>oAssetDocParm.Code
oAssetDocParm.Code = 18
oAssetDoc = oAS.Get(oAssetDocParm)
oAssetDoc.Reference = "Test"
oAS.Update(oAssetDoc)
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavel,
I believe there is no object exposed for this table on the DI API.
Kind Regards,
Diego Lother
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.