Skip to main content

Actions

The ballerinax/microsoft.dynamics365.finance.fixedasset package exposes the following clients:

ClientPurpose
ClientProvides full CRUD access to Microsoft Dynamics 365 Finance fixed assets, fixed asset value models, asset lendings, asset sortings, leasing groups, parent leases, and depreciation/ledger/asset-use reference data via the Dynamics 365 Finance and Operations OData API.

Client

Provides full CRUD access to Microsoft Dynamics 365 Finance fixed assets, fixed asset value models, asset lendings, asset sortings, leasing groups, parent leases, and depreciation/ledger/asset-use reference data via the Dynamics 365 Finance and Operations OData API.

Configuration

FieldTypeDefaultDescription
authOAuth2ClientCredentialsGrantConfigRequiredOAuth2 client credentials grant configuration used to authenticate with Microsoft Entra ID (Azure AD): tokenUrl, clientId, clientSecret, and optional scopes.
httpVersionhttp:HttpVersion2.0HTTP protocol version to use for outbound requests.
http1Settingshttp:ClientHttp1Settings{}HTTP/1.x client settings including keep-alive, chunking, and proxy configuration.
secureSockethttp:ClientSecureSocket()SSL/TLS configuration for secure connections.
proxyhttp:ProxyConfig()Proxy server configuration.

Initializing the client

import ballerinax/microsoft.dynamics365.finance.fixedasset;

configurable string tokenUrl = ?;
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string serviceUrl = ?;

fixedasset:Client fo = check new (
{
auth: {
tokenUrl,
clientId,
clientSecret
}
},
serviceUrl
);

Operations

Asset lendings

listAssetLendings

Reads all asset lending records.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListAssetLendingsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:AssetLendingsCollection|error

Sample code:

fixedasset:AssetLendingsCollection lendings = check fo->listAssetLendings(
queries = {
filter: "dataAreaId eq 'USMF' and Leaseholder eq 'Contoso Logistics'",
top: 20
}
);
createAssetLendings

Creates an asset lending record.

Parameters:

NameTypeRequiredDescription
payloadAssetLendingYesThe asset lending record to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:AssetLending|error

Sample code:

fixedasset:AssetLending lending = check fo->createAssetLendings({
dataAreaId: "USMF",
fAInventoryNumber: "FA-001028",
dateOfLease: "2026-01-15",
leaseholder: "Contoso Logistics",
expectedReturnDate: "2026-04-15",
location: "Warehouse 4"
});
getAssetLendings

Reads a specific asset lending record by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
dateOfLeasestringYesThe date of lease key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetAssetLendingsQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:AssetLending|error

Sample code:

fixedasset:AssetLending lending = check fo->getAssetLendings(
"USMF",
"FA-001028",
"2026-01-15"
);
deleteAssetLendings

Deletes a specific asset lending record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
dateOfLeasestringYesThe date of lease key field.
headersDeleteAssetLendingsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteAssetLendings(
"USMF",
"FA-001028",
"2026-01-15",
headers = {ifMatch: eTag}
);
updateAssetLendings

Updates a specific asset lending record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
dateOfLeasestringYesThe date of lease key field.
payloadAssetLendingYesThe fields to update.
headersUpdateAssetLendingsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:AssetLending|error

Sample code:

fixedasset:AssetLending updated = check fo->updateAssetLendings(
"USMF",
"FA-001028",
"2026-01-15",
{actualReturnDate: "2026-04-10"},
headers = {ifMatch: eTag}
);

Asset sortings

listAssetSortings

Reads all asset sorting fields.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListAssetSortingsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:AssetSortingsCollection|error

Sample code:

fixedasset:AssetSortingsCollection sortings = check fo->listAssetSortings(
queries = {
filter: "dataAreaId eq 'USMF' and Sorting eq 'Sorting1'"
}
);
createAssetSortings

Creates an asset sorting field.

Parameters:

NameTypeRequiredDescription
payloadAssetSortingYesThe asset sorting field to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:AssetSorting|error

Sample code:

fixedasset:AssetSorting sorting = check fo->createAssetSortings({
dataAreaId: "USMF",
sorting: "Sorting1",
identification: "WHSE-A",
description: "Warehouse A racking"
});
getAssetSortings

Reads a specific asset sorting field by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
sortingstringYesThe sorting key field.
identificationstringYesThe identification key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetAssetSortingsQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:AssetSorting|error

Sample code:

fixedasset:AssetSorting sorting = check fo->getAssetSortings(
"USMF",
"Sorting1",
"WHSE-A"
);
deleteAssetSortings

Deletes a specific asset sorting field.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
sortingstringYesThe sorting key field.
identificationstringYesThe identification key field.
headersDeleteAssetSortingsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteAssetSortings(
"USMF",
"Sorting1",
"WHSE-A",
headers = {ifMatch: eTag}
);
updateAssetSortings

Updates a specific asset sorting field.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
sortingstringYesThe sorting key field.
identificationstringYesThe identification key field.
payloadAssetSortingYesThe fields to update.
headersUpdateAssetSortingsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:AssetSorting|error

Sample code:

fixedasset:AssetSorting updated = check fo->updateAssetSortings(
"USMF",
"Sorting1",
"WHSE-A",
{description: "Warehouse A - Zone 1 racking"},
headers = {ifMatch: eTag}
);

Fixed asset value models

listFixedAssetValueModels

Reads all fixed asset value models.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListFixedAssetValueModelsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:FixedAssetValueModelsCollection|error

Sample code:

fixedasset:FixedAssetValueModelsCollection models = check fo->listFixedAssetValueModels(
queries = {
filter: "dataAreaId eq 'USMF' and Status eq 'Open'",
top: 25
}
);
createFixedAssetValueModels

Creates a fixed asset value model.

Parameters:

NameTypeRequiredDescription
payloadFixedAssetValueModelYesThe value model to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:FixedAssetValueModel|error

Sample code:

fixedasset:FixedAssetValueModel model = check fo->createFixedAssetValueModels({
dataAreaId: "USMF",
fixedAssetNumber: "FA-001028",
valueModelId: "DEPR",
depreciationProfileId: "SL-5YR",
acquisitionPrice: 25000.00,
serviceLifeYears: 5,
status: "Open"
});
getFixedAssetValueModels

Reads a specific fixed asset value model by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
valueModelIdstringYesThe value model id key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetFixedAssetValueModelsQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:FixedAssetValueModel|error

Sample code:

fixedasset:FixedAssetValueModel model = check fo->getFixedAssetValueModels(
"USMF",
"FA-001028",
"DEPR"
);
deleteFixedAssetValueModels

Deletes a specific fixed asset value model.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
valueModelIdstringYesThe value model id key field.
headersDeleteFixedAssetValueModelsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteFixedAssetValueModels(
"USMF",
"FA-001028",
"DEPR",
headers = {ifMatch: eTag}
);
updateFixedAssetValueModels

Updates a specific fixed asset value model.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
valueModelIdstringYesThe value model id key field.
payloadFixedAssetValueModelYesThe fields to update.
headersUpdateFixedAssetValueModelsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:FixedAssetValueModel|error

Sample code:

fixedasset:FixedAssetValueModel updated = check fo->updateFixedAssetValueModels(
"USMF",
"FA-001028",
"DEPR",
{status: "Closed"},
headers = {ifMatch: eTag}
);

Fixed assets

listFixedAssets

Reads all fixed asset master records.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListFixedAssetsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:FixedAssetsCollection|error

Sample code:

fixedasset:FixedAssetsCollection assets = check fo->listFixedAssets(
queries = {
filter: "dataAreaId eq 'USMF' and FixedAssetGroupId eq 'VEHICLES'",
top: 20,
'select: "FixedAssetNumber,Name,Type,AcquisitionDate"
}
);
createFixedAssets

Creates a fixed asset master record.

Parameters:

NameTypeRequiredDescription
payloadFixedAssetYesThe fixed asset to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:FixedAsset|error

Sample code:

fixedasset:FixedAsset asset = check fo->createFixedAssets({
dataAreaId: "USMF",
fixedAssetNumber: "FA-001028",
name: "Forklift - Warehouse 4",
fixedAssetGroupId: "VEHICLES",
'type: "Tangible",
acquisitionDate: "2026-01-10",
acquisitionPrice: 25000.00
});
getFixedAssets

Reads a specific fixed asset master record by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetFixedAssetsQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:FixedAsset|error

Sample code:

fixedasset:FixedAsset asset = check fo->getFixedAssets(
"USMF",
"FA-001028"
);
deleteFixedAssets

Deletes a specific fixed asset master record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
headersDeleteFixedAssetsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteFixedAssets(
"USMF",
"FA-001028",
headers = {ifMatch: eTag}
);
updateFixedAssets

Updates a specific fixed asset master record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
payloadFixedAssetYesThe fields to update.
headersUpdateFixedAssetsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:FixedAsset|error

Sample code:

fixedasset:FixedAsset updated = check fo->updateFixedAssets(
"USMF",
"FA-001028",
{name: "Forklift - Warehouse 4 (relocated)"},
headers = {ifMatch: eTag}
);

Fixed assets V2

listFixedAssetsV2

Reads all fixed asset master records (V2 entity, exposing an extended field set).

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListFixedAssetsV2QueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:FixedAssetsV2Collection|error

Sample code:

fixedasset:FixedAssetsV2Collection assets = check fo->listFixedAssetsV2(
queries = {
filter: "dataAreaId eq 'USMF' and Type eq 'Tangible'",
top: 20
}
);
createFixedAssetsV2

Creates a fixed asset master record (V2 entity).

Parameters:

NameTypeRequiredDescription
payloadFixedAssetV2EntityYesThe fixed asset to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:FixedAssetV2Entity|error

Sample code:

fixedasset:FixedAssetV2Entity asset = check fo->createFixedAssetsV2({
dataAreaId: "USMF",
fixedAssetNumber: "FA-002044",
name: "Company vehicle - Sedan",
'type: "Tangible",
acquisitionDate: "2026-02-01",
acquisitionPrice: 32000.00
});
getFixedAssetsV2

Reads a specific fixed asset master record by key (V2 entity).

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetFixedAssetsV2QueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:FixedAssetV2Entity|error

Sample code:

fixedasset:FixedAssetV2Entity asset = check fo->getFixedAssetsV2(
"USMF",
"FA-002044"
);
deleteFixedAssetsV2

Deletes a specific fixed asset master record (V2 entity).

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
headersDeleteFixedAssetsV2HeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteFixedAssetsV2(
"USMF",
"FA-002044",
headers = {ifMatch: eTag}
);
updateFixedAssetsV2

Updates a specific fixed asset master record (V2 entity).

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fixedAssetNumberstringYesThe fixed asset number key field.
payloadFixedAssetV2EntityYesThe fields to update.
headersUpdateFixedAssetsV2HeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:FixedAssetV2Entity|error

Sample code:

fixedasset:FixedAssetV2Entity updated = check fo->updateFixedAssetsV2(
"USMF",
"FA-002044",
{name: "Company vehicle - Sedan (fleet 2)"},
headers = {ifMatch: eTag}
);

Leasing groups

listLeasingGroups

Reads all leasing groups.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListLeasingGroupsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:LeasingGroupsCollection|error

Sample code:

fixedasset:LeasingGroupsCollection groups = check fo->listLeasingGroups(
queries = {
filter: "dataAreaId eq 'USMF'"
}
);
createLeasingGroups

Creates a leasing group.

Parameters:

NameTypeRequiredDescription
payloadLeasingGroupYesThe leasing group to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:LeasingGroup|error

Sample code:

fixedasset:LeasingGroup group = check fo->createLeasingGroups({
dataAreaId: "USMF",
leaseGroup: "OFFICE",
company: "USMF",
description: "Office equipment leases"
});
getLeasingGroups

Reads a specific leasing group by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
leaseGroupstringYesThe lease group key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetLeasingGroupsQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:LeasingGroup|error

Sample code:

fixedasset:LeasingGroup group = check fo->getLeasingGroups(
"USMF",
"OFFICE"
);
deleteLeasingGroups

Deletes a specific leasing group.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
leaseGroupstringYesThe lease group key field.
headersDeleteLeasingGroupsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteLeasingGroups(
"USMF",
"OFFICE",
headers = {ifMatch: eTag}
);
updateLeasingGroups

Updates a specific leasing group.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
leaseGroupstringYesThe lease group key field.
payloadLeasingGroupYesThe fields to update.
headersUpdateLeasingGroupsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:LeasingGroup|error

Sample code:

fixedasset:LeasingGroup updated = check fo->updateLeasingGroups(
"USMF",
"OFFICE",
{description: "Office and IT equipment leases"},
headers = {ifMatch: eTag}
);

Parent leases

listParentLeases

Reads all parent lease records.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListParentLeasesQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:ParentLeasesCollection|error

Sample code:

fixedasset:ParentLeasesCollection leases = check fo->listParentLeases(
queries = {
filter: "dataAreaId eq 'USMF' and VendorAccount eq 'V-2050'",
top: 20
}
);
createParentLeases

Creates a parent lease record.

Parameters:

NameTypeRequiredDescription
payloadParentLeaseYesThe parent lease to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:ParentLease|error

Sample code:

fixedasset:ParentLease lease = check fo->createParentLeases({
dataAreaId: "USMF",
leaseId: "LEASE-0077",
company: "USMF",
leaseDescription: "Delivery van lease",
leaseStartDate: "2026-01-01",
currency: "USD",
vendorAccount: "V-2050",
annuityType: "OrdinaryAnnuity"
});
getParentLeases

Reads a specific parent lease record by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
leaseIdstringYesThe lease id key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetParentLeasesQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:ParentLease|error

Sample code:

fixedasset:ParentLease lease = check fo->getParentLeases(
"USMF",
"LEASE-0077"
);
deleteParentLeases

Deletes a specific parent lease record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
leaseIdstringYesThe lease id key field.
headersDeleteParentLeasesHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteParentLeases(
"USMF",
"LEASE-0077",
headers = {ifMatch: eTag}
);
updateParentLeases

Updates a specific parent lease record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
leaseIdstringYesThe lease id key field.
payloadParentLeaseYesThe fields to update.
headersUpdateParentLeasesHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:ParentLease|error

Sample code:

fixedasset:ParentLease updated = check fo->updateParentLeases(
"USMF",
"LEASE-0077",
{leaseDescription: "Delivery van lease - renewed"},
headers = {ifMatch: eTag}
);

R asset groups

listRAssetGroups

Reads all depreciation asset groups.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListRAssetGroupsQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:RAssetGroupsCollection|error

Sample code:

fixedasset:RAssetGroupsCollection groups = check fo->listRAssetGroups(
queries = {
filter: "dataAreaId eq 'USMF'"
}
);
createRAssetGroups

Creates a depreciation asset group.

Parameters:

NameTypeRequiredDescription
payloadRAssetGroupYesThe depreciation asset group to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:RAssetGroup|error

Sample code:

fixedasset:RAssetGroup group = check fo->createRAssetGroups({
dataAreaId: "USMF",
depreciationGroup: "OFFICEEQ",
name: "Office equipment",
valueModel: "DEPR",
lifetime: 5,
yearRate: 20.0,
depreciationStartDate: "AcquisitionDate"
});
getRAssetGroups

Reads a specific depreciation asset group by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
depreciationGroupstringYesThe depreciation group key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetRAssetGroupsQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:RAssetGroup|error

Sample code:

fixedasset:RAssetGroup group = check fo->getRAssetGroups(
"USMF",
"OFFICEEQ"
);
deleteRAssetGroups

Deletes a specific depreciation asset group.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
depreciationGroupstringYesThe depreciation group key field.
headersDeleteRAssetGroupsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteRAssetGroups(
"USMF",
"OFFICEEQ",
headers = {ifMatch: eTag}
);
updateRAssetGroups

Updates a specific depreciation asset group.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
depreciationGroupstringYesThe depreciation group key field.
payloadRAssetGroupYesThe fields to update.
headersUpdateRAssetGroupsHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:RAssetGroup|error

Sample code:

fixedasset:RAssetGroup updated = check fo->updateRAssetGroups(
"USMF",
"OFFICEEQ",
{yearRate: 25.0},
headers = {ifMatch: eTag}
);

R asset ledgers

listRAssetLedgers

Reads all legacy asset ledger posting profiles.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListRAssetLedgersQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:RAssetLedgersCollection|error

Sample code:

fixedasset:RAssetLedgersCollection ledgers = check fo->listRAssetLedgers(
queries = {
filter: "dataAreaId eq 'USMF'"
}
);
createRAssetLedgers

Creates a legacy asset ledger posting profile.

Parameters:

NameTypeRequiredDescription
payloadRAssetLedgerYesThe asset ledger posting profile to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:RAssetLedger|error

Sample code:

fixedasset:RAssetLedger ledger = check fo->createRAssetLedgers({
dataAreaId: "USMF",
postingProfile: "FAPOST01",
description: "Standard fixed asset posting profile"
});
getRAssetLedgers

Reads a specific legacy asset ledger posting profile by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
postingProfilestringYesThe posting profile key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetRAssetLedgersQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:RAssetLedger|error

Sample code:

fixedasset:RAssetLedger ledger = check fo->getRAssetLedgers(
"USMF",
"FAPOST01"
);
deleteRAssetLedgers

Deletes a specific legacy asset ledger posting profile.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
postingProfilestringYesThe posting profile key field.
headersDeleteRAssetLedgersHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteRAssetLedgers(
"USMF",
"FAPOST01",
headers = {ifMatch: eTag}
);
updateRAssetLedgers

Updates a specific legacy asset ledger posting profile.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
postingProfilestringYesThe posting profile key field.
payloadRAssetLedgerYesThe fields to update.
headersUpdateRAssetLedgersHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:RAssetLedger|error

Sample code:

fixedasset:RAssetLedger updated = check fo->updateRAssetLedgers(
"USMF",
"FAPOST01",
{description: "Standard fixed asset posting profile - revised"},
headers = {ifMatch: eTag}
);

R asset tables

listRAssetTables

Reads all legacy asset ledger tables.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListRAssetTablesQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:RAssetTablesCollection|error

Sample code:

fixedasset:RAssetTablesCollection tables = check fo->listRAssetTables(
queries = {
filter: "dataAreaId eq 'USMF' and AssetType eq 'Vehicle'",
top: 20
}
);
createRAssetTables

Creates a legacy asset ledger table entry.

Parameters:

NameTypeRequiredDescription
payloadRAssetTableYesThe legacy asset record to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:RAssetTable|error

Sample code:

fixedasset:RAssetTable legacyAsset = check fo->createRAssetTables({
dataAreaId: "USMF",
fAInventoryNumber: "FA-LEG-0091",
name: "Delivery truck",
assetType: "Vehicle",
acquisitionDate: "2020-05-01",
acquisitionCost: 45000.00,
serialNumber: "SN-88421"
});
getRAssetTables

Reads a specific legacy asset ledger table entry by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetRAssetTablesQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:RAssetTable|error

Sample code:

fixedasset:RAssetTable legacyAsset = check fo->getRAssetTables(
"USMF",
"FA-LEG-0091"
);
deleteRAssetTables

Deletes a specific legacy asset ledger table entry.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
headersDeleteRAssetTablesHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteRAssetTables(
"USMF",
"FA-LEG-0091",
headers = {ifMatch: eTag}
);
updateRAssetTables

Updates a specific legacy asset ledger table entry.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
payloadRAssetTableYesThe fields to update.
headersUpdateRAssetTablesHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:RAssetTable|error

Sample code:

fixedasset:RAssetTable updated = check fo->updateRAssetTables(
"USMF",
"FA-LEG-0091",
{name: "Delivery truck - fleet 2"},
headers = {ifMatch: eTag}
);

R asset uses

listRAssetUses

Reads all legacy asset usage records.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListRAssetUsesQueriesNoOData query parameters: skip, top, filter, orderby, expand, crossCompany, count, 'select.

Returns: fixedasset:RAssetUsesCollection|error

Sample code:

fixedasset:RAssetUsesCollection uses = check fo->listRAssetUses(
queries = {
filter: "dataAreaId eq 'USMF' and FAInventoryNumber eq 'FA-LEG-0091'"
}
);
createRAssetUses

Creates a legacy asset usage record.

Parameters:

NameTypeRequiredDescription
payloadRAssetUseYesThe asset usage record to create.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: fixedasset:RAssetUse|error

Sample code:

fixedasset:RAssetUse use = check fo->createRAssetUses({
dataAreaId: "USMF",
fAInventoryNumber: "FA-LEG-0091",
period: "2026-01",
outputMileage: 1250.5
});
getRAssetUses

Reads a specific legacy asset usage record by key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
periodstringYesThe period key field.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetRAssetUsesQueriesNoOData query parameters: expand, 'select.

Returns: fixedasset:RAssetUse|error

Sample code:

fixedasset:RAssetUse use = check fo->getRAssetUses(
"USMF",
"FA-LEG-0091",
"2026-01"
);
deleteRAssetUses

Deletes a specific legacy asset usage record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
periodstringYesThe period key field.
headersDeleteRAssetUsesHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: error?

Sample code:

check fo->deleteRAssetUses(
"USMF",
"FA-LEG-0091",
"2026-01",
headers = {ifMatch: eTag}
);
updateRAssetUses

Updates a specific legacy asset usage record.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier.
fAInventoryNumberstringYesThe fixed asset inventory number key field.
periodstringYesThe period key field.
payloadRAssetUseYesThe fields to update.
headersUpdateRAssetUsesHeadersNoOptional ifMatch ETag header for optimistic concurrency; mapped to If-Match.

Returns: fixedasset:RAssetUse|error

Sample code:

fixedasset:RAssetUse updated = check fo->updateRAssetUses(
"USMF",
"FA-LEG-0091",
"2026-01",
{outputMileage: 1400.0},
headers = {ifMatch: eTag}
);