<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>select class on Extended Classification</title><link>https://www.aras.com/community/f/development/3836/select-class-on-extended-classification</link><description>When adding a new Part, and by default extended classifications are not selected, is there a way to automatically select classes or all classes of  the extended classifications for a new part when the new part form opens?</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: select class on Extended Classification</title><link>https://www.aras.com/community/thread/11076?ContentTypeID=1</link><pubDate>Fri, 18 Apr 2025 04:13:49 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:bc4a5562-ba64-4dac-b668-ec2a1ad7afcd</guid><dc:creator>Kitty</dc:creator><description>&lt;p&gt;Thanks a lot for responding. It works.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;Innovator inn = this.getInnovator();
this.setAction(&amp;quot;get&amp;quot;);
this.setAttribute(&amp;quot;levels&amp;quot;,&amp;quot;1&amp;quot;);
Item temp = this.apply();
Item rel = temp.getRelationships(&amp;quot;z_part_xClass&amp;quot;);
int c = rel.getItemCount();
if(c==0){
  this.setAction(&amp;quot;edit&amp;quot;);
  Item xyz_xclass= this.createRelationship(&amp;quot;z_part_xClass&amp;quot;, &amp;quot;add&amp;quot;);
  Item xclass= xyz_xclass.createRelatedItem(&amp;quot;xClass&amp;quot;, &amp;quot;get&amp;quot;);
  xclass.setProperty(&amp;quot;id&amp;quot;,&amp;quot;82B56E7EC88B4CDA87ABAE435A18D72D&amp;quot;);
  Item res = this.apply();
}

return this;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am also looking for a solution to preset it when create a new Item. (My customer want the xClass be selected at beginning)&lt;/p&gt;
&lt;p&gt;do you think it works with client method?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BTW: Sorry I don&amp;#39;t have answer about your question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: select class on Extended Classification</title><link>https://www.aras.com/community/thread/11074?ContentTypeID=1</link><pubDate>Thu, 17 Apr 2025 13:08:19 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a85fa9b0-6b05-47c2-970a-8d467e3fa500</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Your query in general is a bit confusing :).&amp;nbsp;Your &amp;quot;createRelationship&amp;quot; happens after apply(). And you do the apply() on your xClass item and not at the item you want to edit.&lt;/p&gt;
&lt;p&gt;I haven&amp;acute;t tested this one, but I think it worked somehow like this:&lt;/p&gt;
&lt;p&gt;this.setAction(&amp;quot;edit&amp;quot;);&lt;br /&gt;Item xyz_xclass= this.createRelationship(&amp;quot;xyz_xClass&amp;quot;, &amp;quot;add&amp;quot;);&lt;br /&gt;Item xclass= &lt;span&gt;xyz_xclass&lt;/span&gt;.createRelatedItem(&amp;quot;xClass&amp;quot;, &amp;quot;get&amp;quot;);&lt;br /&gt;xclass.setProperty(&amp;quot;id&amp;quot;,&amp;quot;123&amp;quot;);&lt;br /&gt;Item res = this.apply();&lt;/p&gt;
&lt;p&gt;But I recommend that you check the official documentation. There is a guide regarding xClasses with many samples.&lt;br /&gt;&lt;br /&gt;BTW: If you use thumbnails, I would be happy for additional feedback regarding this topic! Thanks!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://www.aras.com/community/f/development/55452/multiple-sessions-created-for-trivial-actions-like-edit-what-can-be-the-reason"&gt;Multiple sessions created for trivial actions like &amp;quot;edit&amp;quot;. What can be the reason?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: select class on Extended Classification</title><link>https://www.aras.com/community/thread/11073?ContentTypeID=1</link><pubDate>Thu, 17 Apr 2025 12:01:28 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:613e6cb3-1c3d-48cb-a2a6-b3f347d7ee8e</guid><dc:creator>Kitty</dc:creator><description>&lt;p&gt;&lt;a href="/community/members/angela"&gt;AngelaIp&lt;/a&gt;&amp;nbsp;Hi Angelalp, I was searching the exact same solution and found your answer.&lt;br /&gt;I tried to do this by kick the Method with onBeforeAdd or by AML, but It didn&amp;#39;t worked to me.&lt;br /&gt;Do you have any further info on this topic?&lt;br /&gt;&lt;br /&gt;my method&lt;br /&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;Innovator inn = this.getInnovator();
this.setAction(&amp;quot;edit&amp;quot;);
Item xclass = inn.newItem(&amp;quot;xClass&amp;quot;,&amp;quot;get&amp;quot;);
xclass.setProperty(&amp;quot;id&amp;quot;,&amp;quot;F55659D7906F4E3A89767FEEFF1913C0&amp;quot;);
xclass = xclass.apply();
Item rel = this.createRelationship(&amp;quot;y_ext_xClass&amp;quot;,&amp;quot;add&amp;quot;);
rel.setRelatedItem(xclass);
return this;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and I got this&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;No items of type &amp;#39;y_ext_xClass&amp;#39; found using the criteria:&lt;br /&gt;&amp;lt;Item type=&amp;quot;y_ext_xClass&amp;quot; id=&amp;quot;6BFA1DD7EC1B4AB19C7ACAF59AE8C5C8&amp;quot; serverEvents=&amp;quot;1&amp;quot; select=&amp;quot;*[is_not_null()]&amp;quot; /&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: select class on Extended Classification</title><link>https://www.aras.com/community/thread/1845?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 08:30:08 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:08ee4339-7ed7-4388-88c9-d8ac875dd4fa</guid><dc:creator>AngelaIp</dc:creator><description>Hi fdxu168,

I came accross your post as I currently also work with extended classification. I think your use case can be solved with a Method.

xClasses are linked to Parts like this:

PART
-&amp;gt; Relationship &lt;code&gt;PART_XCLASS&lt;/code&gt;
--&amp;gt; Related Item &lt;code&gt;XCLASS&lt;/code&gt; (e.g. class &amp;#39;Resistor&amp;#39;)

I think it´s possible to add the PART_XCLASS relationship with an onBeforeAdd/onAfterAdd Method.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: select class on Extended Classification</title><link>https://www.aras.com/community/thread/1844?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 16:47:48 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9b5aaf64-95a6-4e04-baee-b4e636fe48ef</guid><dc:creator>Former Member</dc:creator><description>I want to set a default extended classification for new Parts when the new part form loads, so users don’t have to select them. Is this possible?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: select class on Extended Classification</title><link>https://www.aras.com/community/thread/1843?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 13:25:36 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b4b09e82-4e70-4079-8442-4bbc95aad64c</guid><dc:creator>Eli Donahue</dc:creator><description>Hi fdxu168,

Just to confirm - are you looking for a way to set a default extended classification for new Parts? Or do you want to prompt users to select an extended classification before the new Part form loads?

Eli

&lt;hr /&gt;

Eli Donahue

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>