cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Translate the entire conversation x

Retrieve parts related to a Document ID in WRS

CB_12625553
12-Amethyst

Retrieve parts related to a Document ID in WRS

Version: Windchill 12.1

 

Use Case: We associate Documents to our Parts using ReferencedBy links.


Description:

If a document changes, it will show up in the ESI output under Changed Documents. The Document IDs are present here, but the DocumentLinks are not. This is because ReferencedBy links don't change even if the Document or Parts do.

 

How do I retrieve the Parts associated with a document using WRS?

 

Example output:

{
  "AddedECN": [
    {
      "Description": "",
      "Number": "00011",
      "ObjectID": "OR:wt.change2.WTChangeOrder2:1709165",
      "@elementName": "ECNHeader",
      "Class": "com.ptc.windchill.esi.ChangeHeader",
      "LastChangedBy": "",
      "TargetID": "1000-1",
      "Name": "MyECN"
    }
  ],
  "Release": [
    {
      "Locale": "en_US",
      "Destination": "1000-1",
      "TransactionNumber": "11",
      "PrimaryObjectID": "OR:wt.change2.WTChangeOrder2",
      "@elementName": "Transaction",
      "CreatedDate": "2025-06-04 16:51:18 UTC",
      "ReleaseNumber": "10"
    }
  ],
  "ChangedDocuments": [
    {
      "Description": "",
      "ObjectID": "OR:wt.doc.WTDocument:1709259",
      "PreviousVersion": "A",
      "DocumentType": "WCTYPE|wt.doc.WTDocument|com.ptcmscloud.MY_TYPE$$Document",
      "Title": "",
      "Iteration": "2",
      "TargetID": "1000-1",
      "Name": "MyFile1",
      "Number": "0040",
      "Version": "B",
      "@elementName": "Document",
      "State": "RELEASED",
      "IsAssembly": "false",
      "Class": "com.ptc.windchill.esi.Document"
    }
  ]
}

 

2 REPLIES 2
Fadel
22-Sapphire III
(To:CB_12625553)

Not sure if something enahnced in 12.1 , on 12.0 I couldn't find anything OOTB 

easiest way is to define an alias attribute on doc type to find reference parts using below mapping 

masterReference^wt.doc.WTDocumentMaster~references@wt.part.WTPartReferenceLink~referencedBy^wt.part.WTPart~number
Fadel_0-1749559977598.pngFadel_1-1749560027720.png

 

 

 

 
we can then query alias attribute in WRS 
Fede

Hello @CB_12625553,

 

It looks like you have a response from a PTC Support expert. If it helped you solve your question, please mark the reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Announcements

Top Tags