અપડેટ: An anonymous poster left a great comment about internal names. Be sure to read it.
ઇવેન્ટ રીસીવરો અને અન્ય કોડ સાથે કામ કરે છે, ત્યારે કે ઓબ્જેક્ટ મોડલ મારફતે સંદર્ભો શેરપોઈન્ટ યાદી વસ્તુઓ, હું ઘણી વાર રનટાઈમે આ ભૂલ પેદા કરતી ભૂલો કરી:
Xyzzy લોડ કરવામાં ભૂલ અને ચાલી ઘટના રીસીવર Conchango.xyzzyEventReceiver, આવૃત્તિ 1.0.0.0 =, સંસ્કૃતિ = તટસ્થ, PublicKeyToken = 0dc50a750396c3ac. Additional information is below. : Value does not fall within the expected range.
I think this is a fairly generic error that is potentially caused many different ways. તેમ છતાં, one simple explanation is that I’m referencing a field incorrectly. If the name of the field is "Due Date", I must reference it like this in an event receiver:
properties.ListItem["Due Date"]
When I misspell or use the wrong case when referencing the field, SharePoint generates the above mentioned runtime error. ઉદાહરણ તરીકે, this is wrong:
properties.ListItem["due Date"]
</અંત>
મારા બ્લોગ પર સબ્સ્ક્રાઇબ કરો.
I agree with paul but i also want to add something for this exception.
Sometime the Field Name is different than the Field Internal Name in the list so trying to access the field using Field Name in the object model gives us the above exception. To resolve this problem always try to access the fields using their Internal Names.
How can you find the internal Names of the Fields?
1) Go To Sharepoint List. Go to New | New Item.
2) New Item form will be displayed. Right click on the form and click on View Source. Search for the Field Internal Name in the opened HTML code. You will find the Field Internal Name along with Field Name.