Get BusinessObjectKeyString from form
I want to loop through all open forms and get the BusinessObjectKeyString. How can I get the BusinessObjectKeyString from a form object?
I can get the BusinessObjectKeyString from pVal.BusinessObjectKeyString(), but only if I have the form object, this is not possible in my case. Idea: Instead I can get the DocNum from the Textbox with the ID "8". Example: If the DocNum is 250866, I can see that the BusinessObjectKeyString is 867. So my guess is that I can extract the BusinessObjectKeyString by removing the first two numers and add one. Does this alsways work? Is there an easier way to get the BusinessObjectKeyString from a form?
DocEntry and DocNum are two separate things and you should not try to figure out one based on the other.
If you have the form object, this is how you can get the docentry:
string docEntry = "";
foreach (SystemDatasource ds in form.SystemDataSources.Values)
docEntry = ds.GetValue(0, 0).Trim();
Thanks. it works great :)