Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tommykakashi
tommykakashi / Find()
Created March 7, 2013 08:53
Find() method in X++
static HMEmployee find(HMEmployeeId employeeId,
boolean _forUpdate = false)
{
HMEmployee employeeTable;
if (employeeId)
{
if (_forUpdate)
{
employeeTable.selectForUpdate (_forUpdate);
@tommykakashi
tommykakashi / NewQuery
Last active December 14, 2015 15:19
Build a Query in X++
Query query;
QueryRun qr;
QueryBuildRange qbr;
QueryBuildDataSource qbds, bdsInventDim;
query = new Query();
qbds = query.addDataSource(tableNum(PriceDiscGroup));
qbdsInventDim = qbds.addDataSource(tableNum(InventDim));
qbdsInventDim.addLink(fieldNum(PriceDiscAdmTrans, InventDimId), fieldNum(InventDim, InventDimId));