Description
Updates an existing employee role.
The data for the role, including the key of the role to be updated, is contained in the EmployeeRoleSetup passed to the method. To update a role, you must first retrieve it using the GetEmployeeRoleSetup method.
Syntax
Parameters
Remarks
Example
| Updating a role (C#) | Copy Code |
|---|
public void update() { try { EmployeeRoleSetupParams getLine; SAPbobsCOM.EmployeeRoleSetup updateLine; getLine = (EmployeeRoleSetupParams)oRoleSrv.GetDataInterface(EmployeeRolesSetupServiceDataInterfaces.erssEmployeeRoleSetupParams); //update a record //please note that the typeID should be the typeID of an existing record. getLine.TypeID = 19; updateLine = oRoleSrv.GetEmployeeRoleSetup(getLine); updateLine.Name = "role updated"; updateLine.Description = "role updated"; oRoleSrv.UpdateEmployeeRoleSetup(updateLine); oRoleSrv.UpdateEmployeeRoleSetup(updateLine); } catch (Exception ex) { Interaction.MsgBox(ex.Message, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); } }
|
|
Example
See Also