Welcome!
This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!
Human key access
Hello,
Is it possible to access the human key of the table in the function '<form>_Edit_Redirect' in '<form>_FormController'?
If so how can I get that value?
Hi,
Here is an example of the possible code:
var evenp = CSGenioAevenp.search(UserContext.Current.PersistentSupport, "KEY_VALUE_TO_SEARCH", UserContext.Current.User);
// HumanKeyName => contains list of human key fields of the table. ex: desginac,layrname
string humanKeyInfo = evenp.Information.HumanKeyName; //string humanKeyFields = CSGenioAevenp.GetInformation().HumanKeyName;
string [] humanKeyFields = humanKeyInfo.Split(',');
// var evenp = new CSGenioAevenp(UserContext.Current.User); evenp.QPrimaryKey = "KEY_VALUE_TO_SEARCH"; evenp.getFields(humanKeyFields, UserContext.Current.PersistentSupport); // <= alternative to select form DB just human key fields values
foreach (var humanKeyField in humanKeyFields)
/* result += */ evenp.returnValueField("evenp." + humanKeyField);
Keep Informed
About the Community
Question tools
Stats
Asked: 7/3/20, 1:57 PM |
Seen: 1590 times |
Last updated: 8/22/20, 3:40 PM |