Key patterns:
select vs while select appropriately — select for single record, while select for batchttsBegin / ttsCommit for transactional writesSysDictTable / SysDictField over raw schema queriesbuf2Buf() for record copying, DictField::extendedFieldType() for EDT lookupsCommon snippets:
x
// Select with field list (avoid SELECT *)
select Field1, Field2 from myTable where myTable.RecId == _recId;
// While select with joins
while select myTable
join myTable2 where myTable2.RefRecId == myTable.RecId
{
// process
}
// Insert with initFrom
myTable2.initFrom(myTable);
myTable2.FieldX = value;
myTable2.insert();
OData endpoint: /data/<EntityName> — supports CRUD via GET/POST/PATCH/DELETE
DMF (Data Management Framework):
DMFDataManagementService or OData /data/DataManagementDefinitionGroupsKey entity patterns: DataEntity, SysDataEntity, custom entities via DataEntityAttribute
See references/integrations.md for detailed OData, Custom Services, and DMF patterns.
https://<env>.operations.dynamics.com/api/services/UserSessionService/AifUserSessionServiceSysServiceController for data operations/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.ImportFromPackageSee references/security.md for XDS and Record Level Security details.
Hotfix/ISV deployment:
CI/CD with Azure DevOps:
xppc.exex
try
{
ttsBegin;
// transactional logic
ttsCommit;
}
catch (Exception::Error)
{
ttsAbort;
throw error("Descriptive error message");
}
SELECT * — always specify field listssetTimeout(DB_TIMEOUT) for long-running queriesinsert_recordset / update_recordset over row-by-row operationsindex keyword when table is largeFor detailed guides, read these files as needed: