How do you ENABLE a new user via EFx

So i finally have it working now! I used a variation of this topic Auto-Disable User Accounts? - ERP 10 - Epicor User Help Forum (epiusers.help)

here is my code

this.CallService<Ice.Contracts.UserFileSvcContract>(uf =>{
  var dsEnableUf = new Ice.Tablesets.UpdExtUserFileTableset();
  var dsUf = uf.GetByID(userID);
  bool errorsOut = false; 
  var ufr = new UserFileRow();
  ufr.UserID = dsUf.UserFile[0].UserID;
  ufr.UserDisabled = false;
  ufr.RowMod = "U";
  dsEnableUf.UserFile.Add(ufr);
  uf.UpdateExt(ref dsEnableUf,false,true, out errorsOut);
}) ;
1 Like