ARAS 12 - How to remove "Create New XXX" button ?

Hi,

I defined an ItemType named "Cost".
This is a relationship without related item.
There is nothing in the "Can Add" of this ItemType because nobody can create a "Cost". There are only created by code.

In ARAS 12, I have this:

What should I do in CUI to remove "Create New Cost" ?

Parents Reply Children
  • Hi Nilesh

    You can create specific identity and add in can Add. Only members of that identity can add the item in UI as well as in IOM method. In your method, you can grant the access to that identity and revoke later.

    Code Snippet below

    In my case, I added ARAS PLM in Can Add - Only members of ARAS PLM can add this item

    Innovator inn = this.getInnovator();

    // Granting Access to ARAS PLM
    Aras.Server.Security.Identity plmIdentity = Aras.Server.Security.Identity.GetByName("Aras PLM");
    bool PermissionWasSet = Aras.Server.Security.Permissions.GrantIdentity(plmIdentity);
    try
    {
    var createItem = inn.newItem("Document", "add");
    createItem.setProperty("name", "TestDocument");
    createItem.setProperty("item_number", "1234");
    createItem= createItem.apply();
    }
    finally
    {
    // Revoke 'Aras PLM' permissions
    if (PermissionWasSet) Aras.Server.Security.Permissions.RevokeIdentity(plmIdentity);
    }
    return this;

    Thank You

    Gopikrishnan R

  • Hello Gopikrishnan,

    I did it, thanks for reply.

    Thanks,
    Nilesh