需求:
Customer组的成员
在执行mofidy操作时
Description字段为可选,其他字段都为只读
脚本如下:
dim session,groups,group
set session=GetSession
set groups=session.GetUserGroups
For Each group In groups
If group="Customer" then
dim fieldnamelist
set fieldnamelists=entity.GetFieldNames
For Each fieldnamelist In fieldnamelists
entity.SetFieldRequirednessForCurrentAction Description,AD_OPTIONAL
entity.SetFieldRequirednessForCurrentAction Company,AD_OPTIONAL
Next
End If
Next
现象:编译通过,但是在测试库中点击“modify”的时候,就报错:
"错误!在操作modify期间执行挂钩失败",它是附加到***的ACTION_INITALIZATION挂钩。失败的原因:缺少对象
请各位帮忙看看是什么原因