Please try the sample, if it works for you, please use the code from the sample as inspiration. If the sample does not work for you, please explain in more detail.
It is not appeared automatically, you will need to utilize and display this field in your plugin. Please check the sample code, there is a method called loadClientLPR () line 166 around in MainForm.cs. in the method, you will see each event’s detail in foreach loop and that has the custom field. That is what you need to use and show in your plugin.
While the Config API Client sample is brilliant in showing if things can be done, and in giving some guidance to the structure etc. we would recommend using the strongly typed classes, ConfigurationItems class, and with the link you were on the right route.
I made an experiment and made some code that will show you how to use the class.
void GetLPRCustom(string matchListName, string registrationNumber)
{
ManagementServer managementServer = new ManagementServer(Configuration.Instance.ServerFQID);
LprMatchList myList = managementServer.LprMatchListFolder.LprMatchLists.FirstOrDefault(x => x.Name.Equals(matchListName));
ServerTask getCustomTask = myList.MethodIdGetCustomFieldsForRegistrationNumber(registrationNumber);
string test = getCustomTask.GetProperty("CustomFields");
label1.Text = "Customfield for " + registrationNumber + " is " + test + Environment.NewLine;
}
I guess this directly answers your question. Along the way I had another method that I would like to share also..
void GetLPRCustom(string matchListName)
{
ManagementServer managementServer = new ManagementServer(Configuration.Instance.ServerFQID);
LprMatchList myList = managementServer.LprMatchListFolder.LprMatchLists.FirstOrDefault(x => x.Name.Equals(matchListName));
MethodIdGetRegistrationNumbersInfoResult result = myList.MethodIdGetRegistrationNumbersInfoWithResult();
foreach (var info in result.RegistrationNumbersWithCustomFields)
{
foreach (var infoField in info)
{
label1.Text += infoField + " ";
}
label1.Text += Environment.NewLine;
}
}
Note that this code will crash if there is no LPR on the server, please make sure you implement error handling..