Exception on updating a CLASS_PART

Hello, in Agile PLM Java SDK, I am trying to update a Part (e.g. ItemConstants.CLASS_PART).  Specifically, to update the Title Block Item Category field in the Java UI.   Where is documentation that would tell me the identifier (name) of the “Item Category” field at the API level?   I get the following exception:

 

Agile Exceptions:Exception Id: -WS_24- Exception Message: -In valid class type Part. Expected class type is SoftwareFirmware- Exception Cause: -null-

 

Are there any example code that update a part number and maybe fields from the Title Page (a full listing of field names would help).

 

My code looks like this (going through a layer before calling the agile sdk):

 

Map<String, String> objectParams = new HashMap<>();
objectParams.put(AgileService.MAKE_BUY, "Make");
//objectParams.put("itemCategory", "Software");
//objectParams.put("ItemCategory", "Software");
//objectParams.put(ItemConstants.ATT_TITLE_BLOCK_ITEM_CATEGORY.toString(), "Software");
UpdateObjectRequest request = new UpdateObjectRequest();
request.setParams(objectParams);
//request.setObjectType(ItemConstants.CLASS_PART.toString());
request.setObjectType("Part");
request.setDisableAllWarnings(true);
request.setObjectNumber(params.getPartNumber());

 

Thanks in advance.

Agile User Asked on January 2, 2020 in Agile PLM (v9).
Add Comment
1 Answer(s)

Hello Randhy

Check Section 5 “Working with Data cells” in SDK manual

https://docs.oracle.com/cd/E83928_04/otn/pdf/integration/agaap.pdf

That has examples on how to update attributes including title block.

To get the list of attribute names, look in Agile Administrator. Each of the fields would have an API name which is what you need

Hope this helps

-Raj

Agile Expert Answered on January 5, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.