Approach 3: Create a New Custom Domain with a Custom Entity Representation, with Imports to PTC Domains
Create a new custom domain CustomDomain v1 with a custom part representation.
Create CustomParts.json
{
"name": "CustomPart",
"collectionName": "CustomParts",
"includeInServiceDocument": true,
"parent": {
"name": "Parts"
},
"attributes":[],
"navigations":[
{
"name":"RelatedChangeNotices",
"target":"ChangeNotices",
"type":"PTC.ChangeMgmt.ChangeNotice",
"isCollection":true
}
]
}
Request
GET /Windchill/servlet/odata/CustomDomain/CustomParts(‘<oid>')?$select=Identity&$expand=RelatedChangeNotices
Accept: application/json
Response
"@odata.context": "<Windchill_URL>/CustomDomain/$metadata#CustomParts(ID,Identity)/$entity",
"@odata.id": "<Windchill_URL>/CustomDomain/CustomParts('OR:wt.part.WTPart:749554')",
"ID": "OR:wt.part.WTPart:749554",
"Identity": "Part - 0000000921, Test part for change, Demo Organization, A.1 (Design)",
"@PTC.AppliedContainerContext.LocalTimeZone": "America/St_Johns",
"RelatedChangeNotices": [
{
"Category": null,
"CreatedOn": "2023-05-12T10:34:31-02:30",
"Description": "<p>An example change notice template that includes one default change task. Any selected or affected objects that can be propagated from another change object will be automatically added to the change task. When marked as default, the template is automatically selected when the matching change notice type is selected.</p>",
"DescriptionSummary": null,
"ID": "OR:wt.change2.WTChangeOrder2:749586",
"Identity": "Change Notice - 00041",
"IsRemote": false,
"LastModified": "2023-05-12T10:34:31-02:30",
"Latest": true,
"LifeCycleTemplateName": "Change Notice Life Cycle",
"Name": "CN",
"NeedDate": null,
"Number": "00041",
"ResolutionDate": null,
"Revision": "",
"State": {
"Value": "OPEN",
"Display": "Open"
},
"TypeIcon": {
"Path": "<Windchill_URL>/netmarkets/images/chgnotice.gif",
"Tooltip": "Change Notice"
},
"Uri": null,
"Version": null,
"VersionID": "VR:wt.change2.WTChangeOrder2:749585",
"CreatedBy": "Site, Administrator",
"ModifiedBy": "Site, Administrator",
"ActualStartDate": null,
"CabinetName": "Default",
"ChangeAdminI": [],
"ChangeAdminII": [],
"ChangeNoticeComplexity": {
"Value": "SIMPLE",
"Display": "Fast Track"
},
"EstimatedStartDate": null,
"FolderLocation": "/PLM Test Data",
"FolderName": null,
"ObjectType": "Change Notice",
"ReservedBy": null,
"TeamTemplateName": "Change Notice Team"
}
]

這是否有幫助?