Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Custom30 on Edit Profile
System
Can anoyone tell me why the below code doesn't set the Custom30 field read-only when editing a profile. The same code works on New Profile, New Version, and Check In:
=====================
CONST nrDescription = 3
CONST nrPracticeArea = 53
CONST nrLawType = 54
Sub EditProfileDlg_OnInitDialog(dlg)
Dim lngArray
lngArray = Array(nrDescription, nrPracticeArea, nrLawType)
dlg.RequiredList = lngArray
dlg.SetAttributeValueByID nrPracticeArea, dlg.GetAttributeByID(nrPracticeArea), False
dlg.SetAttributeValueByID nrLawType, dlg.GetAttributeByID(nrLawType), False
End Sub
Find more posts tagged with
Comments
jny
This is a known issue. A bug has been reported on the ineffect of disabling child lookup field via scripting.
This is the only work-around that might suffice until the fix is released:
CONST nrDescription = 3
CONST nrPracticeArea = 53
CONST nrLawType = 54
Sub EditProfileDlg_OnInitDialog(dlg)
Dim lngArray
lngArray = Array(nrDescription, nrPracticeArea, nrLawType)
dlg.RequiredList = lngArray
dlg.SetAttributeValueByID nrPracticeArea, dlg.GetAttributeByID(nrPracticeArea), False
'dlg.SetAttributeValueByID nrLawType, doc.GetAttributeByID(nrLawType), False
End Sub
'// This disables the field by setting the Custom30 field value that is returned by the IManDocument object.
'// Please note the Custom30 field only gets disabled when an end-user attempts to change the field.
Sub EditProfileDlg_OnChange(dlg, id)
if id=54 then
dim doc
set doc = dlg.NRTDocument
dlg.SetAttributeValueByID nrLawType, doc.GetAttributeByID(nrLawType), False
end if
End Sub
Migrateduser
My problem is that the field is editable when I want it to be read-only.
jny
Right. Please see my response above again.