0

In an itemupdated event receiver, when referring to list fields, is it better to use the field's internal name, or its display name?

Is there a clear guideline or best practice, or is this a subjective discussion?

5

As per my suggestion, Better to use field's internal name, in future if you may rename your field that doesnot affect the field which you updating on it. because field's internal name never change so no need to update code, whereas display name changed on rename field, so you need to update the code as per you define(renamed) field name

  • I'd say it's better still to use the field guid's, but you may not always know them and it may not always be possible to use them, so internal names as a general rule is a good alternative. – Cameron Verhelst Mar 18 '14 at 7:10
  • I tried using internal name and keeping getting a null value for a specific column. When I use the display name, I am able to retrieve a non-null value. What gives? This is with MOSS 2007. – Web User Dec 18 '15 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.