Yep, you can do that by updating the SysSetupFormRun.init() method to look like below:
FormDataSource f;
FormDataObject o;
int i;
DictField df;
;
super();
SysSecurityFormSetup::loadSecurity(this);
if (curuserid()=="Admin")
{
for (i=1;i<=this.dataSourceCount();i++)
{
f = this.dataSource(i);
df = new DictField(f.cursor().TableId,fieldid2ext(fieldname2id(f.cursor().TableId,"Dimension"),2));
if (df)
{
o = f.object(df.id());
o.allowEdit(false);
}
}
}
Yet, I didn't researched how you can find if the current user belong to a certain group. If you'd knew that, the code can be used directly for a group rather than for individual users like I did. A hint to research that: MainMenu\Administration\Users\Groups tab , see the code for populating the Selected groups list
Comments
Yet, I didn't researched how you can find if the current user belong to a certain group. If you'd knew that, the code can be used directly for a group rather than for individual users like I did. A hint to research that: MainMenu\Administration\Users\Groups tab , see the code for populating the Selected groups list
Ciprian Dudau
Axapta Developer
Its working fine now.
Thanx a lot
Rashi
>>Yet, I didn't researched how you can find if the current user belong to >>a certain group
Here is an example -
Let us say you have created a user group under Accounts Receivable -> Parameters. Let us call this group - 'SalesAdmn'
So in your code you can check like this -
Hope this helps,
Harish Mohanbabu
Long way to go before I sleep..
That's what I was talking about.
Thanks for the solution.
Ciprian Dudau
Axapta Developer