Currently migrating from 10.2.100 to Kinetic 2025.2. So this is my first function I am trying to write.
I have a function created:
Library: QAJobInspection
Function: GetBinNum
Input: jobNum (string)
Output: binNum (string)
The function, Invokes BO Method - Ice.UD101.GetByID → Set Argument/Variable: binNum to tsUD101UD101Row.ShortChar05
I have a customization with a btnText created that
{
var restClient = new RestClientBuilder()
.SetDefaultApiKey(ApiKey)
.UseSession(this.oTrans.CoreSession)
.Build();
using (restClient)
{
try
{
var payload = new RestContent(
new
{
jobNum = "187974"
});
var response = restClient.Function.Post(
"QAJobInspection",
"GetBinNum",
payload,
published: true);
var answer = response.GetAnonymousResult(
new
{
binNum = (string)null
});
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}```
I debug this in Visual Studio and get no errors but I can not see any value from 'answer'.
I am trying to find some documentation on how to do this as per best practices, but I am coming up shy.
Any help will be appreciated. I would be glad for some code examples. This is just proof of concept Hello World hitting the db.
