Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2023-04-12 03:31 PM
I need to get the current user using the Archer 6.12.0.5.1 version, I already tried this code, from version 6.4 I found on the forum, but it doesn't work anymore, I think it has to be updated:
<img src="../BackgroundImageGenerator.axd?className=StyledButton&classProperties=caption:Add User;iconSetStyle:VistaRound;baseColor:%23DDDDDD;disabled:False" onclick="setRecordPermission()">
<script type="text/javascript">
var setUser = {
fldId: '35407',
usersName: parent.parent.ArcherApp.globals.displayName,
usersId: parent.parent.ArcherApp.globals.userId,
itemType: 'user'}; // Use 'group' if you're adding a group
function setRecordPermission() {
var RPFieldRoot = ArcherTech.UI.ClientContentManager.GetInstance().getFieldById(setUser.fldId), UsrArray = [];
var RPFieldRootId = RPFieldRoot.clientId;
UsrArray.push({
name: setUser.usersName,
value: setUser.usersId + ':' + (setUser.itemType == 'group' ? 3 : 1)
});
var serialized = Sys.Serialization.JavaScriptSerializer.serialize(UsrArray);
$('div[id*="'+ RPFieldRootId +'_"] div:first-child').text(setUser.usersName);
$('input[id*="'+ RPFieldRootId +'_"]').val(serialized);
if(setUser.itemType == 'user'){
$('#SelectedUsers'+setUser.fldId).val(setUser.usersId);
}else if(setUser.itemType == 'group') {
$('#SelectedGroups'+setUser.fldId).val(setUser.usersId);
}
}
</script>
Our customer wants to remove a specific user from a group as approval on workflow, the problem is, the user belongs to the same group as the approvals, how can I work around it?
2023-04-12 04:20 PM
@toberle are you getting an errors in the browsers developer tools console?
For the user issue. Is the user or group listed for approvers?
Advisory Consultant
2024-01-02 04:09 PM
I wasn't getting any errors, sorry for the late delay.
2024-08-22 05:49 AM
Hi David, i am also facing the same issue with my archer version of 6.12
Request you to kindly help us with the code.
Thanks in advance