Cannot access "Default Role Center" field for Tenant Profile table even after issue #500 resolved
I created profile through profile object as below but still cannot make it default. How I can access Default Role Center field from AL. Thank you.
profile "Power Accountant" { Description = 'Power Accountant'; RoleCenter = "Power Accountant Role Center"; Customizations = MyCustomization; }
Hi @yandko, There are no property on the profile object to set that, but you can change it from code, for instance using the onInstall triggers .
hi @thpeder, thank you for the reply. I tried to define record variable to point to Profile table (record 2000000072) but it looks like the system doesn't allow me to do this saying
"The type or method 'Profile' cannot be used for 'Extension' development. Error: The package could not be created."
Maybe it is because Profile is a reserved system keyword for defining Profile object.
local procedure HandleFreshInstall();
var
r: Record 2000000072;
begin
// Do work needed the first time this extension is ever installed for this tenant.
// Some possible usages:
// - Service callback/telemetry indicating that extension was install
// - Initial data setup for use
end;
Hi @yandko, The table was made available in the anniversary update, which was released about half a year ago. What version are you running?
hi @thpeder, thank you for not leaving this along. I use the latest AL Language VCODE extension 0.15.18771 and NAV Platform Build 21441.
@yandko, Could you try and redownload the symbols in VSCode. Ctrl + Shift + P then type: AL: Download Symbols.
@thpeder I did this previously and tried one more time
[2018-05-24 19:57:07.92] Using reference symbols cache path: c:\Users\yandko\Documents\AL\ALProject1./.alpackages [2018-05-24 19:57:07.95] Sending request to http://localhost:7059/Dev110/dev/packages?publisher=Microsoft&appName=Application&versionText=11.0.1441.0&tenant=default [2018-05-24 19:57:07.95] Sending request to http://localhost:7059/Dev110/dev/packages?publisher=Microsoft&appName=System&versionText=11.0.0.0&tenant=default [2018-05-24 19:57:08.06] All reference symbols have been downloaded.
no luck
local procedure HandleFreshInstall();
var
r: Record 2000000072;
begin
// Do work needed the first time this extension is ever installed for this tenant.
// Some possible usages:
// - Service callback/telemetry indicating that extension was install
// - Initial data setup for use
end;
gives
error AL0296: The type or method 'Profile' cannot be used for 'Extension' development. Error: The package could not be created.
AL VsCode extension versions do not work with any server versions. You have to use the AL VsCode extension that was released for the given server version,
Hi @yandko, As Kalman pointed out, you should be using the VSIX that came with the DvD. I found the problem and it is that the system symbol file doesn't allow you to use that table and NAV 2018 didn't get that update since it got in after we branched for NAV 2018, so please have a look at: Will features from the latest Dynamics 365 releases be back-ported to NAV 2018? and I found an issue on NAV 2018, what do I do?
hi @thpeder, I have reinstalled NAV2018 from "CU 05 NAV 2018 W1" and visual studio code Al Language extension from VSIX file that is coming with this CU (AL Language 0.12.20065). Than re-Downloaded Symbols. Same issue. Neither definition works. It can't create a reference to Profile table.
r1: Record 2000000072;
r2: Record 2000000177;
r3: Record "Tenant Profile";
r4: Record "Profile";
Hi @yandko, It wasn't backported to Nav 2018 only Business Central, so I'll fix that.