Պարզ բացատրություն: “Value չի ընկնում շրջանակներում սպասվող տիրույթում է.”

ԹԱՐՄԱՑՆԵԼ: An anonymous poster left a great comment about internal names. Be sure to read it.

Երբ աշխատում միջոցառման ստացողի եւ այլ կոդը, որը հղում Sharepoint ցուցակի նյութեր միջոցով օբյեկտային մոդելը, Ես հաճախ սխալներ, որոնք առաջացնում այդ սխալը է: Runtime:

Error բեռնում եւ վազում միջոցառումը ընդունիչ Conchango.xyzzyEventReceiver է xyzzy, Տարբերակ = 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", Ես պետք է հղում, որ նման այս իրադարձության ստացողի:

properties.ListItem["Due Date"]

Երբ ես տառասխալ անել կամ օգտագործել սխալ դեպքը, երբ հիշատակում դաշտը, SharePoint generates the above mentioned runtime error. Օրինակ,, սա սխալ է:

properties.ListItem["due Date"]

</վերջ>

Անդամագրվել իմ բլոգում.

Արորդիների Tags:

One thought on "Պարզ բացատրություն: “Value չի ընկնում շրջանակներում սպասվող տիրույթում է.”

  1. Sanjaykuma​r Patel

    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.

Ավելացնել կարծիք

Ձեր էլ. Փոստի հասցեն չի հրապարակվելու. Պահանջվող դաշտերը նշված են աստղանիշով *