User LifeCyle

Hello Experts, I' m a new guy in Aras Innovator. in the first step I created a Lifecycle for the User. Everytime a new user is created, the Lifecycle state will set the state to "enabled" with  an"onAfterAdd" method. This works fine for me. In the next step I want to create another Server method, which should automatically change the Lifecycle state from "enabled" to "disbaled" if the logon_enabled property changed from 1 to 0. Any idea how to solve this problem? Regards John
Parents
  • Hi John, You should be able to create an onAfterEdit event that follows the pseudocode below:
    if (logon_enabled == 1 && state == "Disabled")
        this.promote("Enabled");
    
    if (logon_enabled == 0 && state == "Enabled")
        this.promote("Disabled");
    
    Hope this helps! Eli
    Eli Donahue Aras Labs Software Engineer
Reply
  • Hi John, You should be able to create an onAfterEdit event that follows the pseudocode below:
    if (logon_enabled == 1 && state == "Disabled")
        this.promote("Enabled");
    
    if (logon_enabled == 0 && state == "Enabled")
        this.promote("Disabled");
    
    Hope this helps! Eli
    Eli Donahue Aras Labs Software Engineer
Children
No Data