<?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>How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/f/development/3496/how-to-create-a-new-part-toc-menu-item-that-does-a-custom-search</link><description>Hi,

On the ACE 2017 Europe conference, a technique that utilized Federated Data to add a TOC menu item that did a custom search was showcased. In my case, I want to add a new TOC menu item, besides the Part menu item, that searches among Released Parts</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/5950?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 15:18:23 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:ab5ec28e-2fb1-4d43-8f02-5746e692f463</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Hi LukSor,&lt;/p&gt;
&lt;p&gt;please notice that this one is a 3 year old discussion and project made by strangers from the internet :).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In Innovator 12 Saved Searches improved so&amp;nbsp;I am not sure if this project is still worth the effort.&lt;/p&gt;
&lt;p&gt;I am not aware of your &amp;#39;need to open/close behavior&amp;#39;. Maybe you check out the github project that is linked somewhere which contain the lastest code and not just code snippets.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;acute;s possible to manually add Actions or Reports to the fake item, but this is a lot of work when you want to do many of them. I once make a couple of tests to automatically assign the Actions and Reports by CUI Methods, even have somewhere around an old code sample if you really want to take this&amp;nbsp;topic seriously.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Angela&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/5910?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 20:35:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c295d2e7-e59a-4577-abe8-f17f20edb6ce</guid><dc:creator>LukSor</dc:creator><description>&lt;p&gt;Hi, first of all I&amp;#39;d love to thank all the users for your input.&lt;br /&gt;I am also facing problem of creating &amp;quot;fake&amp;quot; items instead of custom searches - in my case for chosen classes of Documents.&lt;/p&gt;
&lt;p&gt;To give you the picture I have added new Item types reflecting all properties and permissions of Document item type. I added server event (found here :)) to &amp;quot;redirect&amp;quot; to Documents item type and set it &amp;quot;onGet&amp;quot;, &amp;quot;onAdd&amp;quot;, &amp;quot;onUpdate&amp;quot; also&amp;nbsp;added 1 client event to enable Add new to create new Document (2 line JS also found here)&lt;/p&gt;
&lt;p&gt;For now I&amp;nbsp;am able&amp;nbsp;to lock unlock or save as the &amp;quot;fake&amp;quot; item but first I have to open and close the item, I guess to keep to &amp;quot;original item&amp;quot; in place. When I try without this step, it tries to get the &amp;quot;fake&amp;quot; item type.&lt;br /&gt;With refreshing the topic I&amp;#39;d like ask if some of you tried to make all the buttons and actions &amp;quot;cloned&amp;quot; from original item type?&lt;/p&gt;
&lt;p&gt;Thanks, Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/3947?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2019 12:35:17 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:2174ea3b-5285-41a1-9943-aa058d91ceda</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Any news? Lately, getting answers from Aras has become very difficult.&lt;/p&gt;
&lt;div id="KnM9nf"&gt;&lt;span class="tw-menu-btn KTDgic" id="tw-cst"&gt;&lt;span class="tw-menu-btn-image z1asCe wuXmqc" title="Clear source text"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="QmZWSe"&gt;
&lt;div class="DHcWmd"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/3875?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 13:17:40 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:08c8ec28-f4cc-4fa1-baf6-96f5eeceb568</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;I am happy to see that this forum thread is one of the most viewed in the Aras forum.&lt;/p&gt;
&lt;p&gt;@Hey Aras,&lt;/p&gt;
&lt;p&gt;Can you give me a short update to this one? Will the feature discussed in this threat actually be a standard feature in 12 SP4? I have seen something comparable at ACE Europe in a presentation about upcoming features. I at least know that Aras knows about this topic and the project and that it was used by some folks out there. Even if the project is mainly a proof-of-concept, it would be fair to know, if Aras decided to provide a standard solution for this task. It&amp;acute;s important that these kind of information is available for community, to avoid that the community wastes further time for ideas that already made it to the Aras roadmap.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1648?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 09:08:06 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b634ef50-242c-4d5b-b0f0-13c3486c4fa1</guid><dc:creator>AngelaIp</dc:creator><description>I have done some basic cleanup of the sample project and added an image for a sample use case.
-&amp;gt; &lt;a href="https://github.com/AngelaIp/custom-itemtype-view"&gt;github.com/.../custom-itemtype-view&lt;/a&gt;

Currently, I am having mixed feeling about the current result.
I still like the idea and the basic sample works. But the current version is inflexibly and terrible to maintain. 

Instead of treating each non-working CUI button separately, maybe a better approach is the use of CUI Methods, that handle the parameters passed to the original CUI buttons. 
I made some successful attempts with the automatic linking of the original Part &lt;strong&gt;Actions &lt;/strong&gt;and &lt;strong&gt;Reports &lt;/strong&gt;to the FakePart with a additional Methods in the &lt;strong&gt;Presentation Configuration&lt;/strong&gt;.
This way Actions and Reports were automatically added to the &lt;em&gt;Main Window Menubar&lt;/em&gt; and &lt;em&gt;Main Window PopUp Menu&lt;/em&gt;. But I still do not have enough programming knowledge to use this concept for all of the related CUI elements. Maybe things will become a little bit easier with the new xProperties, but I haven´t tried yet.

I do not work on the project often, but I think I&amp;#39;ll find the missing piece of the puzzle someday.

All fresh ideas for this project are very welcomed!!!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1472?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 08:13:51 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:ac4ebd95-26fe-47dd-ba2b-524b9e3b62b8</guid><dc:creator>AngelaIp</dc:creator><description>Hi KalleAnka, I uploaded a second draft including the full ItemType to &lt;a href="https://github.com/AngelaIp/custom-itemtype-view"&gt;github.com/.../custom-itemtype-view&lt;/a&gt; .&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1414?ContentTypeID=1</link><pubDate>Mon, 12 Mar 2018 10:59:51 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9176436e-d558-45f2-8f01-c0a53027842b</guid><dc:creator>AngelaIp</dc:creator><description>Hi KalleAnka,

by default each ItemType shares a basic set of default GUI elements. With a custom &lt;strong&gt;Presentation Configuration&lt;/strong&gt; you can add/replace/delete GUI elements. 
My current sample doesn´t overwrite the default configuration. Every other ItemType will still use the standard stuff. The changes are unique for the Fake-Part-ItemType. 

The main work is done in the Methods. We need two different types:
- &lt;strong&gt;Click Methods&lt;/strong&gt; -&amp;gt; they do the job . By default the Methods link to their original ItemType. Normally that&amp;#39;s good. But in our case that&amp;#39;s exactly the wrong behavior. My Methods read the Part ID from the grid and use it for operations with the original Part. The Methods shall never sees the Fake-ItemType.
- &lt;strong&gt;Init Methods&lt;/strong&gt; -&amp;gt; they take care for the appearance, e.g. shall the lock button be active or greyed out. I currently use the default reinit methods. This works fine in most cases. In my current version only the &lt;strong&gt;Save &lt;/strong&gt;button still makes some trouble. But it shouldn´t be a big task to fix that.

As example:
The standard Lock button is CommandBarItem &lt;code&gt;com.aras.innovator.cui_default.mwt_main_toolbar_lock&lt;/code&gt;.
It use the Init Method &lt;code&gt;cui_reinit_mwt_lock&lt;/code&gt; and the Click method &lt;code&gt;cui_default_mwt_onLockCommand&lt;/code&gt;. 

The corresponding &lt;code&gt;CommandBarSectionsItem&lt;/code&gt;replace this lock button with my own. The look&amp;amp;feel stays the same, but the Click Method now references hard to Part.
I recommend to delete the browser cache to make the project run properly.

I plan to use the project in production in around 2-3 weeks, then I will fix the last few bugs. Maybe I can provide a sample of the full ItemType. There are many small config settings necessary to make it run flawless.
Of course, if there is another simpler solution, I would be highly interested in it! I think the whole stuff can also be solved on SQL level (Polyitems do something similar), but my SQL-skills are incompatible with the requirements of such a task.  
Since Aras use a similar concept in the Inbasket, the solution cannot be that bad.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1420?ContentTypeID=1</link><pubDate>Mon, 12 Mar 2018 04:28:12 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:025008d6-8557-42cf-85a8-3cea874b8553</guid><dc:creator>Former Member</dc:creator><description>I emailed the developer who did the presentation, and he answered that he implemented it in the following way:
&lt;blockquote&gt;here are the steps to do it :
&lt;ul&gt;
 	&lt;li&gt;​Create an ItemType &amp;quot;Component&amp;quot;&lt;/li&gt;
 	&lt;li&gt;Add properties that you want to use (same as origin ItemType) : item_number, name....&lt;/li&gt;
 	&lt;li&gt;Add an entry on the TOC&lt;/li&gt;
 	&lt;li&gt;Add this method on the server event &amp;quot;OnGet&amp;quot; :
&lt;ul&gt;
 	&lt;li&gt;----
​this.setAttribute(&amp;quot;type&amp;quot;, &amp;quot;Part&amp;quot;);
this.setProperty(&amp;quot; classification&amp;quot;, &amp;quot;Component&amp;quot;);
return this.apply();
---&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
 	&lt;li&gt;​​That&amp;#39;s all !&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
However, that&amp;#39;s what we started with. So I asked about our issues with Lock, Unlock, Structure browser, etc. His reply was:
&lt;blockquote&gt;Yes most of the features to work correctly on an item requires the item to be opened in order to leave this “fake” item context.&lt;/blockquote&gt;
So I guess what you have accomplished is the best solution to the problem (I haven&amp;#39;t tried it yet myself though).&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1415?ContentTypeID=1</link><pubDate>Mon, 12 Mar 2018 04:24:10 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c5ed8c59-2d53-4d81-8408-9c7f07956bbe</guid><dc:creator>Former Member</dc:creator><description>Amazing work, Angela. I haven&amp;#39;t really worked with CUI buttons before, only looked at it briefly once. If I understand your project correctly, essentially you are replacing the buttons with your own (directories &amp;quot;CommandBarItem&amp;quot;, &amp;quot;CommandBarSection&amp;quot;, &amp;quot;CommandBarSectionItem&amp;quot; and &amp;quot;PresentationConfiguration&amp;quot;) that call your own methods (directory &amp;quot;Method&amp;quot;)? I guess the key is &lt;code&gt;inn.getItemById(&amp;quot;Part&amp;quot;, id);&lt;/code&gt;, when it uses the custom Part it seems like the caching gets screwed up or something.

Does your project overwrite the existing buttons? Or are they only added for the custom part?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1397?ContentTypeID=1</link><pubDate>Fri, 02 Mar 2018 08:40:36 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:96e44eb6-cf49-40cb-9fb1-9c822581bd15</guid><dc:creator>AngelaIp</dc:creator><description>These two lines in a JS Methods in &amp;#39;Client Events&amp;#39; solves the &amp;quot;New Item&amp;quot; issue. Creating a new Item in the TOC now also leads to Part.

&lt;pre&gt;&lt;code&gt;inDom.setAttribute(&amp;#039;type&amp;#039;,&amp;#039;Part&amp;#039;);
top.aras.evalMethod(&amp;#039;OnShowItemDefault&amp;#039;, inDom, inArgs);&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1396?ContentTypeID=1</link><pubDate>Fri, 02 Mar 2018 06:26:39 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:1876d6ef-25c7-4b95-b2ed-b65d9af33cf7</guid><dc:creator>AngelaIp</dc:creator><description>Sample -&amp;gt; used in tab &amp;quot;Client Style&amp;quot;
&lt;a href="https://github.com/AngelaIp/custom-itemtype-view"&gt;github.com/.../custom-itemtype-view&lt;/a&gt;

Fixes Save, Save As, Lock, Unlock, Structure Browser and Where Used. 
Only creating a new Item still links to the wrong db-instance.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1395?ContentTypeID=1</link><pubDate>Fri, 02 Mar 2018 03:21:43 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:03f27c07-a0d4-4c18-9849-f0ce21297b3d</guid><dc:creator>AngelaIp</dc:creator><description>My PLM tactic is to wait long enough for things to solve themselves. The following code can be used for custom buttons for Lock, Unlock and SaveAs:

&lt;pre&gt;&lt;code&gt;var inn = this.getInnovator();

var topWindow = aras.getMostTopWindowWithAras(window); 
if (topWindow.work &amp;amp;&amp;amp; topWindow.work.grid) { 
    var workFrame = topWindow.work; 

    var id = workFrame.grid.getSelectedID();
    
    var item = inn.getItemById(&amp;quot;Part&amp;quot;, id);
    item.setAction(&amp;quot;copy&amp;quot;);
    // item.setAction(&amp;quot;lock&amp;quot;); 
    // item.setAction(&amp;quot;unlock&amp;quot;);
    item.setAttribute(&amp;quot;doGetItem&amp;quot;, &amp;quot;0&amp;quot;);
    item = item.apply();
    if (item.isError()) {
	 return aras.AlertError(item.getErrorString());
    }
    main.work.searchContainer.runSearch();
}

return item;
&lt;/code&gt;&lt;/pre&gt;


Works without error messages and also the grid is updated. The rest should be just some CUI configuration.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1393?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 11:27:05 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:78141311-d747-442a-b34f-5a0248b33320</guid><dc:creator>AngelaIp</dc:creator><description>Proof of concept: Custom Lock button

&lt;pre&gt;&lt;code&gt;var inn = this.getInnovator();

var topWindow = aras.getMostTopWindowWithAras(window); 
if (topWindow.work &amp;amp;&amp;amp; topWindow.work.grid) { 
    var workFrame = topWindow.work; 
    
    // var selectedIds = workFrame.grid.getSelectedItemIds(&amp;#039;,&amp;#039;).split(&amp;#039;,&amp;#039;);
    var id = workFrame.grid.getSelectedID();
    
    var item = inn.getItemById(&amp;quot;Part&amp;quot;, id);
    item.setAction(&amp;quot;lock&amp;quot;);
    // item.setAttribute(&amp;quot;doGetItem&amp;quot;, &amp;quot;1&amp;quot;);
    item = item.apply();

    if (item.isError()) {
	    return aras.AlertError(item.getErrorString());
    }
    // todo: Refresh Grid of new ItemType
    // parent.onRefresh(); // don´t work
}&lt;/code&gt;&lt;/pre&gt;


Locks the Part without error message. But refreshing the grid of the new ItemType don´t work.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1388?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 07:40:37 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:5b935fe7-fbbb-4d44-a24f-6b05f2f302e3</guid><dc:creator>AngelaIp</dc:creator><description>Nice to see that I am not the only person who has low respect for items containing the term &amp;quot;Core&amp;quot; :-) Welcome to the dark side! But I don´t thnk we should kill the main grid (maybe later... :-)  ). Creating a customized TOC view will high likely not solve the problems with the Actions that link to the false tables.

I made some attempts with JS. Mostly in the ItemType tab “Client Events”  (event = onAfterNew). Problem: The events only react on changes in the new ItemType, not in Part. The whole issue is more in direction of Federation, which I have to deal with the next weeks anyway. 

But maybe we should just think more radical.
In summary, the following functions are currently causing problems:
- Save As 
- Lock / Unlock 
- Structure Browser / Where Used (lower priority for me right now)

All of them have the same fundamental problem. The button actions link to the wrong tables. But they have one thing in common: All of them are CUI elements! (if you use SP9 or above).
Instead of modifying the ItemTypes or Methods, why not get rid of the standard Actions and use own CUI buttons that do the work right?

Something similar is e.g. done in the ItemType InBasket, where lock/unlock is replaced with claim/unclaim.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1364?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2018 02:53:51 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a470a8d0-b330-4877-af06-5d3a5cc12e98</guid><dc:creator>Former Member</dc:creator><description>How are you trying to update the grid with JS?

I took a quick look at it, but I couldn&amp;#39;t figure out how to attach a server event to the grid&amp;#39;s form. I guess it&amp;#39;s the form &lt;code&gt;Core_ItemGridLayout&lt;/code&gt; that renders the grid, but I might be wrong. Since no form is specified in the Part ItemType&amp;#39;s &lt;code&gt;TOC View&lt;/code&gt; relationship, or in our custom Part ItemType for that matter, I assume it automatically falls back on the standard grid. But maybe it&amp;#39;s overkill to try to override the default grid.

Perhaps it&amp;#39;s possible to add a JS method under the ItemType&amp;#39;s &lt;code&gt;Server Events&lt;/code&gt; or &lt;code&gt;Client Events&lt;/code&gt; that gets called whenever the item is saved. I guess you could escape the item&amp;#39;s tab by using &lt;code&gt;parent&lt;/code&gt; in JS and then locate the grid iframe which seems to be named &lt;code&gt;work&lt;/code&gt;, i.e. &lt;code&gt;parent.document.getElementById(&amp;#039;work&amp;#039;)&lt;/code&gt;.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1361?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2018 07:57:51 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9ad83a0c-3626-4a7b-aa93-2d7393a99e90</guid><dc:creator>AngelaIp</dc:creator><description>I currently also see exception some times. Also my Javascript &amp;quot;update the grid&amp;quot; attempts have so far been unsuccessful. But I have not given up yet, I have been looking for exactly these kind of function for an eternity.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1357?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2018 00:49:33 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0f6dce1c-c20c-4319-9a16-bdc2b0f96dc1</guid><dc:creator>Former Member</dc:creator><description>Also getting the &lt;code&gt;Aras.Server.Core.ItemNotFoundException&lt;/code&gt; error when trying to lock existing items from the grid.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1351?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 08:24:11 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0802ac96-4e7f-49d7-ace1-45ff8556325a</guid><dc:creator>AngelaIp</dc:creator><description>I think we are getting closer. onAdd and onUpdate - of course!

With these two &lt;code&gt;lock&lt;/code&gt; and &lt;code&gt;unlock&lt;/code&gt; of existing Parts work fine.
Save As is still optimizable. After &lt;code&gt;Save As&lt;/code&gt; a new copy of the Part is generated, but users have to refresh the grid and the new Item is not shown in a separate window automatically. Most users will high-likely create 5-6 Part copies until they realize that they have to refresh the grid.
Maybe this can be solved with some extra javascript logic.

After &lt;code&gt;Save As&lt;/code&gt; the new Part-copy cannot be unlocked in the grid -&amp;gt; Aras.Server.Core.ItemNotFoundException
Unfortunately there is no onLock Method option that could be used here.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1346?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 06:09:04 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:383e4446-d491-4865-8051-1a93e688a4e5</guid><dc:creator>Former Member</dc:creator><description>Maybe we need to also add the method to the server events &lt;code&gt;onUpdate&lt;/code&gt; for locking to work and &lt;code&gt;onAdd&lt;/code&gt; for &lt;code&gt;Save as&lt;/code&gt; to work.

I believe the &lt;code&gt;KEYED_NAME&lt;/code&gt;, &lt;code&gt;INSTANCE_DATA&lt;/code&gt; columns are just for finding out the table name of an item type, which might be needed if you are going to write SQL instead of AML.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1345?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 03:55:58 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:157bd553-3548-411a-9dd9-8f416e703efb</guid><dc:creator>AngelaIp</dc:creator><description>I made some tests with the &lt;strong&gt;instance_data&lt;/strong&gt; property of the new ItemType and set it manually to &amp;quot;Part&amp;quot; via SQL. This seems to improve the locking behavior, but I am not sure what it actually does. You can use this query to find the current value in a new database view:

&lt;pre&gt;&lt;code&gt;SELECT        KEYED_NAME, INSTANCE_DATA 
FROM            innovator.ITEMTYPE
WHERE        KEYED_NAME LIKE N&amp;#039;%YOUR_NEW_ITEMTYPE%&amp;#039;) &lt;/code&gt;&lt;/pre&gt;


The following three also don´t work:
- Save As 
- Where used 
- Structure browser

All three link to the new ItemType and not to original Part. The behaviour makes sense. But especially &amp;quot;Save As&amp;quot; would be cool feature. In quite 90% of all cases our users use Save as to create a new Part. Right now the new ItemType is just a better version of SavedSearch. With &amp;quot;Save As&amp;quot; included it would become really powerful.

Do you know, who gave the presentation about this topic? I was at ACE Europe 2016 but did not have time last year.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1343?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 03:17:51 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d520a54e-2217-451a-b4d8-729801e48597</guid><dc:creator>Former Member</dc:creator><description>Aha, that is weird! Would be neat if there was a more robust way to accomplish this.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1327?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 12:03:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d18803fa-8655-46e3-aaf2-0c2544f828d9</guid><dc:creator>AngelaIp</dc:creator><description>Hi KalleAnka,

many thanks for that! This seems to work really well, here are a few of my test results:

Actions &amp;amp; Reports from the original Part ItemType can be reused, but must be linked manually in the new ItemType again. I do not think it´s possible to link the original Part Actions and Reports automatically.

The only thing that makes some trouble is locking an item in the new ItemType.
1. Go to the new ItemType
2. Choose a Part
3. Click &amp;quot;Lock&amp;quot; -&amp;gt; Error message: &lt;em&gt;Aras.Server.Core.ItemNotFoundException&lt;/em&gt;
The error message points to the new ItemType and not to the original Part
4. Open a part and close it again
5. Now &amp;quot;Lock&amp;quot; works and references to Part

So in my case &amp;quot;lock&amp;quot; works, but you have to open one Part first. The behavior stays that way until you log out.
All other options like search bar and page controls work fine.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1318?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 00:37:30 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:1ca59a44-7dc2-4061-90eb-4aefa87398c3</guid><dc:creator>Former Member</dc:creator><description>Hi Angelalp,

It might work with:
&lt;pre&gt;setType(&amp;quot;Part&amp;quot;);
var item = apply();
return item;&lt;/pre&gt;
in an &amp;quot;onGet&amp;quot; server method. However, I haven&amp;#39;t tested it that thoroughly yet though.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1269?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 09:53:47 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:4bef2428-c814-4608-aa32-ae2bb598ecd4</guid><dc:creator>AngelaIp</dc:creator><description>Short note. In my solution, the search bar and page controls does not work yet. 
I tried to pass the page, pagesize and maxRecords via AML, but I am not able to click through the pages anyway.

Any ideas?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a new Part TOC menu item that does a custom search?</title><link>https://www.aras.com/community/thread/1268?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 09:37:26 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b4f6fefb-3a94-4929-9af1-bc6f8e4d1c3b</guid><dc:creator>AngelaIp</dc:creator><description>Hi KalleAnka,

I maybe found a solution:

1. Create a new ItemType
2. Add your properties, e.g. item_number and name
3. Create a new &amp;quot;onGet&amp;quot; Server Event
4. Add the following code:

&lt;pre&gt;&lt;code&gt;Innovator inn = this.getInnovator();
Item qryItem = inn.newItem(); 
qryItem.loadAML( 
        &amp;quot;&amp;lt;Item type=&amp;#039;Part&amp;#039; action=&amp;#039;get&amp;#039; select=&amp;#039;item_number,name&amp;#039; doGetItem=&amp;#039;0&amp;#039;&amp;gt;&amp;quot; +
        &amp;quot;&amp;lt;/Item&amp;gt;&amp;quot;
); 
Item resultItem = qryItem.apply();
   
return resultItem;&lt;/code&gt;&lt;/pre&gt;



Best regards!
Angela&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>