Happy New Year!!
I am working on security change for my client to view few status from drop down box.
Let me explain my request in detail. Need to restrict/hide statuses like Approved, Rejected, Revoked and Terminated from Certification status drop down box for specific role in AX2012 R3 Human resources module.
It would be great if some one can help me out with the resolution steps. Thanks in advance.
Use lookup for Certification status field. Modify below code as per your requirement.
Hope this will help you.
public void lookup()
SysTableLookup SysTableLookup = SysTableLookup::newParameters(tablenum(CustTable),this);
Query query = new Query();
QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(CustTable));
Where exactly is the value you want to restrict? “In Human resources module” isn’t very specific and I don’t know the module well enough to be able to iterate all places with “certification status”.
I want to restrict this in Certifications form in Human resource module. This restriction is only for specific role. Please let me know if you need more information. Thanks!
Thanks a lot for your response. I wanted to restrict certification status drop down list for specific role. If I write a lookup method will effect to everyone right or correct me if I am wrong. Thanks!!
Can you try defining XDS policy for the role. You can specify the values in the range in the query.
Thanks for your response. My client not interested in using XDS policy. Is there something we can restrict it using code, please do let me know.
You can restrict it at user group level.
Below piece of code is helpful for you. Write it in my above post i.e. in lookup method.
while select _UserGroupList where _UserGroupList.userId == CurUserId()
if(_UserGroupList.groupId like “UserGroupName”)
//add above post’s code here
Post is from AX 2009.