Aras Innovator – Custom Save As (Copy of) Method 實作另存新檔功能

,

透過建立 ItemType 的 Client Side Action,搭配 JavaScript Method 來實作另存新檔的功能。

  1. 以目標 ItemType 做為要複製的對象
  2. 更新ID和動作為[新增]
  3. 自訂想要複製的欄位
  4. 解鎖該項目
  5. 刷新主畫面
  6. 開啟編輯視窗
var innovator = this.getInnovator();

this.setNewID();
this.setAction("add");
this.setAttribute("isTemp", "1");
this.setProperty("state", "");

this.setProperty("item_number", "Copy of " + this.getProperty("item_number"));

this.unlockItem();

main.work.searchContainer.runSearch();

top.aras.uiShowItemEx(this.node, "tab view", true, false);

留言

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.