Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Reg..ProjStatus menuitem in the actionpane in Projtable form.

Posted on by 560

Hi,

In the Projtable form I want Projstatus button to be greyout  when ever the  projstatus is equal to Completed.

I have tried the below code in the active method.

But its not working. When I dedbugged it seems to be fine.

When set the condition as   CtrlStages.visible(false);  the button is getting disapperead .but allowedit is not working.

if (selectedProjTable.Status ==ProjStatus::Completed)
{
if(selectedProjTable)
{
/*while select role
join userrole
where role.RecId == userrole.SecurityRole
&&userrole.User == curUserId()*/
{
if(Global::isSystemAdministrator())//(role.Name == "System Administrator")
{
CtrlStages.allowEdit(false);
}
//if( !Global::isSystemAdministrator())//(role.Name != "System Administrator")
else
{
CtrlStages.allowEdit(true);
}
}
}
}
else
{
CtrlStages.enabled(false);
}

Please advise.

*This post is locked for comments

  • Verified answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: Reg..ProjStatus menuitem in the actionpane in Projtable form.

    Hi!

    First of all you don't need if(selectedProjTable) because of if (selectedProjTable.Status ==ProjStatus::Completed).

    Try to use CtrlStages.enabled();

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans