Error code : 60018 – Invalid Parameter
I was working on adding new Resource Pool to the team tab of Task.
here is the snippet i’m using to add/update the team tab :
—————————————————————————–
Map<Integer, Object> map = new HashMap<Integer, Object>();
IAgileList rolesList = tabTeam.getAvailableValues(ProgramConstants.ATT_TEAM_ROLES);
rolesList.setSelection(new Object[] {“PPM Task Owner”});
map.put(ProgramConstants.ATT_TEAM_NAME, resourcePool);
map.put(ProgramConstants.ATT_TEAM_ROLES, rolesList);
map.put(ProgramConstants.ATT_TEAM_ALLOCATION, 100);
IRow row = (IRow)team.add(map, false);
—————————————————————————
IAgileList rolesList= teamTable.getAvailableValues(ProgramConstants.ATT_TEAM_ROLES);
Map values = new HashMap();
rolesList.setSelection(new Object[]{“PPM Task Owner”});
values.put(ProgramConstants.ATT_TEAM_NAME, resourcePool);
values.put(ProgramConstants.ATT_TEAM_ALLOCATION, 100);
values.put(ProgramConstants.ATT_TEAM_ROLES, rolesList);
IRow row = teamTable.createRow(values);
————————————————————————————-
None of the above piece of code is working for me when deployed on server as it shows below error :
Error code : 60018
Error message : Invalid parameter.
at com.agile.api.pc.Session.createError(Session.java:1927)
at com.agile.api.pc.APIObject.createError(APIObject.java:76)
at com.agile.api.pc.CascadeList.setSelection(CascadeList.java:1534)
But when i run the same code locally(Standalone), it works absolutely fine.
Could someone please help me on this ?
Setting the list value to a text string and casting as an object is not the same as setting to an actual role object. That would be what i would verify: role object vs string.
As mentioned by Steve, the Invalid Parameter error could be related to the set of a Role.
Try to set the list with an array of IRole objects instead of Strings
INode nodeRoles = (INode)m_session.getAdminInstance().getNode(NodeConstants.NODE_ROLES);
IRole role1 = (IRole)nodeRoles.getChildNode(“PPM Task Owner”);