Hi Christian,
1. Is the ZOpenUITest string field set as read-only? If so, you may need to uncheck that. That might be the problem for vm being null :
AgentryClientSDK.IAgentryControlViewModelStringEdit vm = DataContext as AgentryClientSDK.IAgentryControlViewModelStringEdit;
2. External Values - External Values are a way to pass data FROM open UI control TO agentry screen/action. To do that:
a. Define an external value string, say , "myExtValue" in the External Values section in editor.
b. Implement GetExtensionStirng(String key) method of ICustomAgentryControl interface.
Public string GetExtensionString(string key){
if(key.Equals("myExtValue"){
Return “some string”;
}
}
c. In an agentry action/rule, when you access this external value field, Agentry will call your open UI control's GetExtensionStirng() method to ask for the value. This is the basic mechanism to get data from open ui to agentry.
3. Agentry Actions: Here, you can specify any Agentry action defined in your application to be called from OpenUI control. To run an agentry action , you would call: SMPActionResult result = viewModel.ExecuteAgentryAction(action);