CustomFieldValueList
Forum Sponsor
Top Posters
Julian Pegg
1 posts
Peter Nagy
2 posts
Raymund de Laza
17 posts
Syed_Asad
0 posts
Tony Greyvenstein
0 posts
Ahmed Al-Jubouri
13 posts
Umar Alvi
3 posts
Sibusiso Mahlalela
0 posts
Michael Samanyayi
3 posts
Simon Gumede
0 posts
Only Enterprise Global have the permission to add or delete Custom Fields. When you write code to edit CustomeField at the Enterprise Global level and running it with Enterprise Global checked-in it will show a runtime error because it does NOT have permission to add or delete if it is not Enterprise Global.
How can I solve this problem? I am writing code at the Enterprise Global using Custom Fields as setting attributes to load into a form and when click "OK" it will save it back to the appropriate Custom Fields.
Any help or comments is greatly appreciated.
Thanks,
DC
Thank you DC
I used a similar solution. But stil I dont like that Microsoft uses lists without count or index -properties
Hannes
Error Handling ... If you have a better suggestion please let me know. After researching the web here is a solution to this problem.
Private Sub Sub_Name()
On Error GoTo ErrHandler:
Dim i As Integer
Do
MsgBox (CustomFieldValueListGetItem(pjCustomTaskText2, pjValueListValue, i))
MsgBox (CustomFieldValueListGetItem(pjCustomTaskText2, pjValueListDescription, i))
i = i + 1
Loop
NextLable:
’You next line of code
Exit Sub
ErrHandler:
Select Case Err.Number
Case "The Error Number you are getting"
’ do something if you want
Err.Clear ’it is important to clear your error every time
Resume NextLable:
End Select
End Sub