this.setAttribute("type", "Document");
// You can modify the query here if you want to limit the items returned
// e.g. this.setProperty("classification", "Drawing");
return this.apply();
Using an onGet event like this allowed us to override the query that gets the items and instead tell the query to return Document ItemTypes. You can then customize the properties displayed on the grid by setting the Hidden flag on your properties on the new ItemType.
Chris
Hi Chris,
interesting that also Aras worked on the "onGet" ItemType use case. It sounds identical to the use case discussed in this thread:
https://community.aras.com/f/development/3496/how-to-create-a-new-part-toc-menu-item-that-does-a-custom-search
How does Aras solved the CUI button problem? I met one Aras employee who used my fabulous CUI button concept for a customer solution, but I do not know what he has changed or improved. What kind of concept did you use in your project? Something similar or were you able to find a better approach?
Hi Chris,
interesting that also Aras worked on the "onGet" ItemType use case. It sounds identical to the use case discussed in this thread:
https://community.aras.com/f/development/3496/how-to-create-a-new-part-toc-menu-item-that-does-a-custom-search
How does Aras solved the CUI button problem? I met one Aras employee who used my fabulous CUI button concept for a customer solution, but I do not know what he has changed or improved. What kind of concept did you use in your project? Something similar or were you able to find a better approach?
Hi Angela,
The project I mentioned in this comment had very simple requirements. In my case, all I needed was to have a view-only way of seeing the different classifications, so I did not need to worry about making sure the New, Edit, or Delete buttons pointed to the actual ItemType.
Do you happen to remember who you spoke with? I can check in with them to see if they made any updates or improvements to your concept of using custom CUI buttons in these kinds of views.
Ah ok! Of course for a view-only use case you don´t need to take care for the UI elements.
Your colleague I met was the same that presented the original onGet idea. So I was happy that he liked the CUI concept.
Some remarks: I currently use the following version of the above code, as the original version can produce a few strange side effects in certain scenarios
this.setAttribute("type", "Document");
Item res = this.apply("get");
if(res.isError())
{
return this;
}
return res;