<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use the java api to add WTDocument to the &amp;quot;Change Summary&amp;quot; table  in Change Not in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/880642#M1898</link>
    <description>&lt;P&gt;You need find the link and delete the link.&lt;/P&gt;
&lt;P&gt;Use the Helper class&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;ChangeHelper2.service.&lt;/LI-CODE&gt;
&lt;P&gt;and than the method you need. If you use the method e.g.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;ChangeHelper2.service.getChangeablesAfter(changenotice, false);&lt;/LI-CODE&gt;
&lt;P&gt;then you will receive the links and not the objects. Iterate thru the result and delete the link you don't need anymore.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jun 2023 20:01:54 GMT</pubDate>
    <dc:creator>BjoernRueegg</dc:creator>
    <dc:date>2023-06-12T20:01:54Z</dc:date>
    <item>
      <title>How to use the java api to add WTDocument to the "Change Summary" table  in Change Notice?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/879600#M1893</link>
      <description>&lt;P&gt;I have code to output "Change Summary" object types from a Change Notice&lt;BR /&gt;But I do not know how to add more objects to this table, for example, WTDocument&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;public static void printChangeAfter(WTChangeOrder2 wtChangeOrder2) {
        try {
            QueryResult result = ChangeHelper2.service.getChangeActivities(wtChangeOrder2);
            while (result.hasMoreElements()) {
                WTChangeActivity2 activity = (WTChangeActivity2) result.nextElement();
                QueryResult res = ChangeHelper2.service.getChangeablesAfter(activity);

                while (res.hasMoreElements()) {
                    WTObject object = (WTObject) res.nextElement();
                    System.out.println(object.getType());
                }
            }
        } catch (WTException e) {
            System.out.println("error " + e.getMessage());
        }
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="headerbuttontrackingcode"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 13:13:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/879600#M1893</guid>
      <dc:creator>VladiSlav</dc:creator>
      <dc:date>2024-03-15T13:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the java api to add WTDocument to the "Change Summary" table  in Change Not</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/879712#M1894</link>
      <description>&lt;P&gt;You can use instanceof to know if object is WTDocument, WTPart etc&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;if(object instanceof WTDocument){
WTDocument doc = (WTDocument)Object;

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 22:57:10 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/879712#M1894</guid>
      <dc:creator>WM_9965332</dc:creator>
      <dc:date>2023-06-06T22:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the java api to add WTDocument to the "Change Summary" table  in Change Not</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/879745#M1895</link>
      <description>&lt;P&gt;You can't add any object to the change summary table. This is just the summary of all the change tasks (change activities). You need to add them to a single change task&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;Vector partVec = new Vector();
partVec.addElement(part); //assuming you have the WTPart object 
partVec = ChangeHelper2.service.storeAssociations(ChangeRecord2.class, task, partVec); //task is Change Activity object
ChangeRecord2 resulting_data = (ChangeRecord2)partVec.firstElement();
resulting_data.setDescription("ChangeRecord2 and a Part");
partVec = ChangeHelper2.service.saveChangeRecord(partVec);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;See&amp;nbsp;&lt;A href="https://www.ptc.com/en/support/article/CS122930" target="_blank"&gt;https://www.ptc.com/en/support/article/CS122930&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://www.ptc.com/en/support/article/CS200677" target="_blank"&gt;https://www.ptc.com/en/support/article/CS200677&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 04:45:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/879745#M1895</guid>
      <dc:creator>BjoernRueegg</dc:creator>
      <dc:date>2023-06-07T04:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the java api to add WTDocument to the "Change Summary" table  in Change Not</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/880053#M1896</link>
      <description>&lt;P&gt;&lt;A id="link_15" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.ptc.com/t5/user/viewprofilepage/user-id/224791" target="_self" aria-label="View Profile of BjoernRueegg"&gt;&lt;SPAN class=""&gt;BjoernRueegg&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;,thank you very much, your code works as I wanted&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 10:00:59 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/880053#M1896</guid>
      <dc:creator>VladiSlav</dc:creator>
      <dc:date>2023-06-08T10:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the java api to add WTDocument to the "Change Summary" table  in Change Not</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/880069#M1897</link>
      <description>&lt;P&gt;&lt;A class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.ptc.com/t5/user/viewprofilepage/user-id/224791" target="_self" aria-label="View Profile of BjoernRueegg"&gt;&lt;SPAN class=""&gt;BjoernRueegg&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,please tell me if you have a code to remove objects from the request&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 11:35:43 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/880069#M1897</guid>
      <dc:creator>VladiSlav</dc:creator>
      <dc:date>2023-06-08T11:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the java api to add WTDocument to the "Change Summary" table  in Change Not</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/880642#M1898</link>
      <description>&lt;P&gt;You need find the link and delete the link.&lt;/P&gt;
&lt;P&gt;Use the Helper class&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;ChangeHelper2.service.&lt;/LI-CODE&gt;
&lt;P&gt;and than the method you need. If you use the method e.g.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;ChangeHelper2.service.getChangeablesAfter(changenotice, false);&lt;/LI-CODE&gt;
&lt;P&gt;then you will receive the links and not the objects. Iterate thru the result and delete the link you don't need anymore.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 20:01:54 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/880642#M1898</guid>
      <dc:creator>BjoernRueegg</dc:creator>
      <dc:date>2023-06-12T20:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the java api to add WTDocument to the "Change Summary" table  in Change Not</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/881874#M1899</link>
      <description>&lt;P&gt;&lt;A id="link_15" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.ptc.com/t5/user/viewprofilepage/user-id/224791" target="_self" aria-label="View Profile of BjoernRueegg"&gt;&lt;SPAN class=""&gt;BjoernRueegg&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,thank you very much&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 09:10:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-use-the-java-api-to-add-WTDocument-to-the-quot-Change/m-p/881874#M1899</guid>
      <dc:creator>VladiSlav</dc:creator>
      <dc:date>2023-06-19T09:10:07Z</dc:date>
    </item>
  </channel>
</rss>

