on 12-24-2014 10:49 AM
Hello Professionals,
We are trying to implement a simple workflow, to get a field value in user defined object. This value might be 0 or 1, if 0 the workflow will go in path and if 1 it will go in another path.
We have a problem in writing a script to get this value, we have tried several ways with no hope, there is no full document explaining how to write scripts with UDOs.
which class should I use, CurrentProcess.DataObject(UDO Name), or, CurrentProcess.B1Obj(UDO Name), after that, how can I read a specific field value?
Any help would be highly appreciated,
Thanks in advance
Any updates?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, but be informed that the resolutions that I will mention might be illogical,
Our main issue was how to deal with UDOs in workflows,
From online samples we have successfully built this code block
var frozenType=Utility.getEnumValue(bp, "FrozenType", "tYES");
var validType=Utility.getEnumValue(bp, "ValidType", "tNO");
var docUDOService = company.getGeneralService("upgradeform");
var docUDO;
var docUDOParam = docUDOService.getGeneralDataParam();
var dobj=CurrentProcess.DataObject('dataObject1');
docUDOParam.put("DocEntry", dobj.getItem('Key'));
docUDO = docUDOService.getByParams(docUDOParam);
docUDO.put("U_Status", docUDO.get("Assigned to Team Leader"));
docUDOService.update(docUDO);
This code used to change Status field in the upgradeform UDO to "Assigned to Team Leader".
Try to use this code, if it didn't work, and you got an error stating that service doesn't exist, delete your object, tables, and everything. Then, register it again but name it with lowercase letters, and make sure that Workflow services are stopped while you are registering the object.
After doing all of this, re-try the code and let me know what you got.
Good luck,
any updates?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.