web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SalesLine enable checkbox

(0) ShareShare
ReportReport
Posted on by

Dear All,

I have a checkbox in salesline, i need to enable the checkbox based on role and on selecting the checkbox i need to allow edit the salesprice, but the checkbox is not getting enabled unless i save the line. please assist me. 

Thanks and Regards,

Selva

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    For enabling the checkbox you need to check whether the concerned user is connected to your required role in the active method of salesline datasource and for enabling the salesprice you need to place enabling/disabling code in the modified method of checkbox after super() at datasource level.

    Path: \Forms\SalesTable\Data Sources\SalesLine\Fields\CheckboxField\Methods\modified

    You can use following code to check access for a certain role.

    static void AXC_getUserRol(Args _args)
    {
        SecurityUserRole userRole;
        SecurityRole role;
    
        select * from role join userRole
            where role.RecId == userRole.SecurityRole 
            && userRole.User == curUserId() 
            && userRole.AssignmentStatus == RoleAssignmentStatus::Enabled
            && role.Name == "System administrator";
        
        if (userRole.RecId)
        {
            info(strFmt("%1", role.Name));
        }
    }


  • Community Member Profile Picture
    on at

    Hi Chaitanya,

    Thanks for your reply and time.

    I have found out the issue, the checkbox column in salesline property "AllowEditonCreate" was NO.

    Thanks,

    Selva

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans