Skip to content

Instantly share code, notes, and snippets.

@noxify
Created April 19, 2018 15:27
Show Gist options
  • Save noxify/d24f02a5ab90f9291373c2968d0f85ac to your computer and use it in GitHub Desktop.
Save noxify/d24f02a5ab90f9291373c2968d0f85ac to your computer and use it in GitHub Desktop.
enable/disable mandant in service manager
/**
* Reference: https://docs.microfocus.com/SM/9.60/Codeless/Content/programming/system_language/reference/rad_function_mandant.htm
* with type 2, we're using the defintion from scsecuritygroup
* This defintion is the base for the "security groups" in the operator file
*/
//set mandant to ADMIN, which is our global mandant see all records
var rcRad = system.functions.mandant(2, ["ADMIN"])
var file = new SCFile("probsummary");
var rc = file.doSelect('contact.name="marcusreinhardt"');
//rc returns 0
//reset the mandant to the old value
var rcRad2 = system.functions.mandant(2,["USER"]);
var file2 = new SCFile("probsummary");
var rc2 = file.doSelect('contact.name="marcusreinhardt"');
//rc2 return 9, because there are no records for the mandant USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment