If you quickly want to see entity records using OData, just add /data/[Public collection name] to the environment URL!
https://yourenvironment.dynamics.com/data/Customers
#WHSRF public static WHSUserId getCurrentWHSUserId() { WhsrfPassthrough pass = controller.parmSessionState().parmPass(); WHSUserId userId; if (pass.exists(#UserId)) { userId = pass.lookup(#UserId); } }
##[error]D:\a\1\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets(140,5): Error MSB6006: "LabelC.exe" exited with code -1.
The most likely reason for this is that you have duplicate entries in one or more label files.
You can locate, open and even edit your label files directly in DevOps. Just go to Repos > Files and locate your label files in the hierarchy.
Example: Metadata/Model/Model/AxLabelFile/LabelResources/en-US/XXX.en-US.label.txt
Thanks to Johan Persson for sharing his experiences.
The user will not be able to see or change the range of the field MyField.QueryBuildRange qbrExampleRange; qbrExampleRange = MyDatasource_ds.query().dataSourceTable(tableNum(MyTable)) .addRange(fieldNum(MyTable, MyField)); qbrExampleRange.value(SysQuery::valueEmptyString()); qbrExampleRange.status(RangeStatus::Hidden);
The user will be able to see that there is a "HQ" filter on the Department field, but not able to remove it or change the value.QueryBuildRange qbrDepartmentRange; qbrDepartmentRange = MyDatasource_ds.query().dataSourceTable(tableNum(MyTable)) .addRange(fieldNum(MyTable, Department)); qbrDepartmentRange.value(SysQuery::value('HQ')); qbrDepartmentRange.status(RangeStatus::Locked);
You might also want to enable or disable the button when the form opens.public int task(int _p1) { int ret; #Task if(_p1 == #taskSwitchToDetailsView) { MyButton.enabled(false); } else if(_p1 == #taskSwitchToGridView) { MyButton.enabled(true); } ret = super(_p1); return ret; }
public void run() { super(); if(element.viewOptionHelper().getViewOption() == FormViewOption::Details) { MyButton.enabled(false); } }