Question Locked

How to Using CustomFieldValueListGetItem to get the values

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I created a Task level Text custom Field which is based on the Health Looup Table. I need to get all the values of this field in my Add-in program. I used FieldNameToFieldConstanct to get the Id of the field. I pass the id to CustomFieldValueListGetItem function. But it shows argument not valid error.

here is the coding what i did..
//Getting the Id of Custom Field
pjRoleField = (MSProject.PjCustomField)project.Application.FieldNameToFieldConstant("DMRoles", Microsoft.Office.Interop.MSProject.PjFieldType.pjTask);

//Getting the First ListValue in the CustomField
string desc = project.Application.CustomFieldValueListGetItem(pjRoleField, Microsoft.Office.Interop.MSProject.PjValueListItem.pjValueListValue, 1);

When i executed the second statment I get the error: Arguement is not valid..
Anybody help me to get all the ListValues of Health Lookup table...
Thanks in Advance

1 reply

This discussion is closed to new replies.