![](/img/trans.png)
[英]How to get list of documents with defined value of custom property in Alfresco
[英]To delete the property value in Alfresco custom model
我需要刪除alfresco 5.0.d版本中的node屬性。 嘗試刪除時,出現以下錯誤:
Web腳本狀態405-不允許的方法
露天網頁腳本文件:
function main() {
// Get the username
var userName = url.extension;
// Get the agencycode
var agencycode = args.agencycode;
var path = '+PATH:"/app:company_home/*"';
var cond = 'AND (TYPE:"cm:content")';
var query = path + " " + cond;
// get all nodes and properties
var nodes = search.luceneSearch(query);
logger.system.out(nodes);
for each(var node in nodes)
{
* *// TODO checking the user exists**
if (node.properties["agency:agencyname"].indexOf(agencycode) != -1) {
delete node.properties["agency:agencycode"];
delete node.properties["agency:agencyname"];
delete node.properties["agency:createDate"];
}
}
model.success = true;
}
main();
在上面的腳本中,我正在獲取代理代碼,並反復檢查代理代碼是否匹配,然后刪除node屬性。
請幫助解決此問題。
您正在使用一種不同於Web工件名稱定義的方法來請求Web Script:
<name>.<method>.<extension>
請注意,該名稱模式中使用的方法應該是訪問Web腳本時使用的方法! (獲取,發布,放置,刪除...)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.