SqlPackage.exe /a:import /sf:D:\uatbackup.bacpac /tsn:localhost /tdn:AxDb2 /p:CommandTimeout=1200 /TargetTrustServerCertificate:true
Binarycode (Microsoft Dynamics AX 2012 and D365FO)
This blog is contains coding reference related to Microsoft AX 2012 and D365 finance and operations and Power platform
Saturday, February 7, 2026
import bacpac file SQL
Tuesday, January 27, 2026
Find privilege assigned to a user role
public void init() { next init(); UserInfo userInfo; SecurityUserRole securityUserRole; SecurityPrivilege securityPrivilege; SecurityRolePrivilegeExplodedGraph securityRolePrivilegeExplodedGraph; select firstonly RecId from userInfo exists join securityUserRole where securityUserRole.User == curUserId() exists join securityRolePrivilegeExplodedGraph where securityRolePrivilegeExplodedGraph.SecurityRole == securityUserRole.SecurityRole exists join securityPrivilege where securityPrivilege.RecId == securityRolePrivilegeExplodedGraph.SecurityPrivilege && securityPrivilege.Identifier == 'YOURPRIVILEGENAME' && securityUserRole.AssignmentStatus == RoleAssignmentStatus::Enabled && (securityUserRole.ValidFrom < DateTimeUtil::utcNow() || securityUserRole.ValidFrom == utcDateTimeNull()) && (securityUserRole.ValidTo > DateTimeUtil::utcNow() || securityUserRole.ValidTo == utcDateTimeNull()); // Check if the user has a specific security privilege if (userInfo.RecId) { // Find the control and hide it FormStringControl control = this.design().controlName(formControlStr(HcmWorkerV2, SN)); if (control) { control.visible(false); } } }
Subscribe to:
Comments (Atom)