Bojensen Blogs

Tag: MorphX

Check Security Key via X++

  SecurityKeySet securityKeys; Boolean fullAccess; ; securityKeys = new SecurityKeySet(); securityKeys.loadUserRights(curuserid()); fullAccess = securityKeys.access(securitykeynum("xxxxxxxxxxxxxxx")) == AccessType::Delete; formDesignElement.visible(fullAccess); Malaysia Dynamics AX Blog: Check Security Key via X++

Dynamics Ax – Update the records with single query statement.

For updating the ‘N’ no. of records we can use simple query statement instead of using while loop. (i.e. while select inventTrans where ) By using update_recordset we can update multiple records at a time. oldRFQCaseId = this.orig().RFQCaseId; ttsbegin; update_recordset inventTrans setting TransRefId = this.RFQCaseId where inventTrans.TransRefId == oldRFQCaseId; ttscommit; Dynamics Ax – Update the…

Coding against Dimensions

The usual method of programming against a specific dimension in Ax is as follows: salesTable.Dimension[SysDimension::Center + 1] = ‘The cost centre’; However, this code is not technically correct. It relies on the enum value of the dimension matching the array dimension (plus 1), which is not guaranteed. If a developer follows Microsoft’s best practice guide…