When I am trying to iterate SPFieldUserValueCollection I am not getting SPFieldUserValue value. But it is going to if condition and saying value is null.

If convert field to MultipleAllowed= No and use SPFieldUserValue that I can get value for single user ( not using SPFieldUserValueCollection)

SPFieldUserValueCollection fieldValues = (SPFieldUserValueCollection)lstItem["SPE Primary Contact"];

  foreach (SPFieldUserValue fieldValue in fieldValues)
    if (fieldValue != null)



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.