Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Restore model stone between environment, then users override permission is back to original (blocked fields are unblocked)

(0) ShareShare
ReportReport
Posted on by 507

Hi guys,

I blocked some fields from some tables to avoid some users accessing these fields.

However, it is quite unstable. After we restore model stone from Test to Production environment, it seems that the field is unblocked, which meant that the user can access these fields now.

BOD asked me for reason and what is the best procedure to avoid these issues happen again.

Could you please advise me?

Many thanks

Kylie

  • mnaeembaigAX Profile Picture
    80 on at
    RE: Restore model stone between environment, then users override permission is back to original (blocked fields are unblocked)

    The issue has been resolved. I used the table level mehtod of setLogOnInfo()

    Now my code is;

    public void run()
    {
    
    Com comapp;
    Com reporting;
    Com IDatabase;
    Com IDatabaseTable;
    Com IDatabaseSingleTable;
    COMVariant variant;
    
    str paramwhole;
    str paramfilename;
    str paramCond;
    str ViewYesNo;
    int ret;
    str selectionFormula;
    int tC;
    int i;
    ;
    
    super();
    breakpoint;
    variant = new COMvariant(COMVariantInOut::OUT,COMVariantType::VT_BOOL) ;
    comapp = new COM("CrystalRuntime.Application.11");
    //comapp.LogonServer("crdb_odbc.dll","tms","tacs", "sa", "Hubleather123");
    //paramwhole = this.args().parm("'{Employee.empcode}'='11752'");
    paramwhole = this.args().parm();
    //paramwhole = this.args().parm("{Employee.empcode}='11752'");
    //paramwhole = this.args().parm("{?DateFrom}='01/01/2021';{?DateTo}='03/03/2021';{Employee.empcode}='11752'");
    ret = strfind(paramwhole,"|",2,strlen(paramwhole));
    paramfilename = "e:\\Report10.rpt"; //substr(paramwhole,2,ret-2) ;
    paramcond = substr(paramwhole,ret 1,strlen(paramwhole));
    
    ViewYesNo = substr(paramwhole,1,1);
    reporting = comapp.openreport(paramfilename);
    reporting.discardsaveddata();
    reporting.RecordSelectionFormula(paramCond);
    
    IDatabase =reporting.Database();
    IDatabaseTable = IDatabase.Tables();
    tC = IDatabaseTable.Count();
    
    for (i = 1; i <= tC; i  )
    {
        IDatabaseSingleTable = IDatabaseTable.Item(i);
        IDatabaseSingleTable.SetLogOnInfo("tms","tacs","sa","Hubleather123");
        IDatabaseSingleTable.TestConnectivity();
    }
    
    reporting.readrecords();
    
    if(ViewYesNo == 'N')
    
    {
    
    variant.boolean(false);
    
    reporting.PrintOut(variant);
    
    }
    
    else
    
    {
    
    ActiveX.ReportSource(reporting);
    
    ActiveX.width(600);
    
    ActiveX.height(350);
    
    ActiveX.DisplayToolbar(true);
    
    ActiveX.DisplayGroupTree(false);
    
    ActiveX.ViewReport();
    
    ActiveX.Refresh();
    
    }
    
    }
    

  • Ett Profile Picture
    507 on at
    RE: Restore model stone between environment, then users override permission is back to original (blocked fields are unblocked)

    Hi Nikolaos,

    I use override permission to block some fields that cannot be accessed by specific users

  • Ett Profile Picture
    507 on at
    RE: Restore model stone between environment, then users override permission is back to original (blocked fields are unblocked)

    Hi Andre,

    I agree with you. I did the override permission on Dev then redo on Production. Some override permission I did on Production only and we got some issues when restore model stone from Test to Production.

    Many thanks for your advice.

    Appreciated.

    Ett

  • Verified answer
    André Arnaud de Calavon Profile Picture
    293,274 Super User 2025 Season 1 on at
    RE: Restore model stone between environment, then users override permission is back to original (blocked fields are unblocked)

    Hi Kylie,

    If you do override of permissions in a production environment, it will make changes in the AOT. This is stored in the model store. Now, you moved the TEST model store to promote new customizations to the production which will overwrite the AOT changes done by the override of permissions. So, your process is causing the issue.

    The best is to treat security permission changes as customizations in AX2012. Start in a DEV or TEST environment and then move it to the production environment via the model store or other deployment option.

  • nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Restore model stone between environment, then users override permission is back to original (blocked fields are unblocked)

    How did you block those fields?

  • Blue Wang Profile Picture
    on at
    RE: Restore model stone between environment, then users override permission is back to original (blocked fields are unblocked)

    Hi Kylie,

    What are your steps? Have any errors or exceptions occurred?

    To move user-to-role mapping information, you need to use Microsoft Dynamics AX data import/export to migrate the UserInfo and SecurityUserRole tables from the business database.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,274 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,947 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans