CustomFieldValueList

Member for

18 years 10 months

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

Member for

20 years 3 months

Thank you DC



I used a similar solution. But stil I don’t like that Microsoft uses lists without count or index -properties



Hannes

Member for

18 years 10 months

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