1

I tried this:

var itemArray = [];

    var clientContext = SP.ClientContext.get_current();
    var oList =   clientContext.get_web().get_lists().getByTitle('FlexMasterList');
    var oListItem;
    var i=1;
    var j=0;
        for(i=1;i<myTableArray.length;i++)
        {

            oListItem=oList.getItemById(myTableArray [i][0]);
            alert(oListItem.get_item('Claim_x0020_Identifier'));        
        }                                                   
}

but I am getting the following error:

The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

Can anyone help me out here?

2
  • Did you checked the internal name your column Claim_x0020_Identifier
    – user51831
    Jul 18, 2016 at 6:21
  • Please refer the link for How to: Retrieve List Items Using JavaScript. This will help you out - msdn.microsoft.com/en-us/library/office/… Jul 18, 2016 at 6:25

1 Answer 1

1

It seems like clientContext.executeQueryAsync(succeededCallback, failedCallback) is missing from you code.

You will be able to access list data in succeededCallback function only.

Please refer msdn link for you reference.

5
  • yes i have gone through the link you provided....the problem is : oList.getItemById( ); and listItemEnumerator object does not have this function
    – Shomit
    Jul 18, 2016 at 8:35
  • if you can tell me how i can get element directly by id without itertaing the list view using id then please help
    – Shomit
    Jul 18, 2016 at 9:00
  • @Shomit can you please post/update the code that you have tried after referring the msdn link So that we can help you in a better way. Jul 18, 2016 at 9:47
  • i posting a new quetion with my code and this was my refernce: vrdmn.com/2013/07/batch-operations-using-javascript.html
    – Shomit
    Jul 18, 2016 at 9:53
  • hey buddy posted new plss help
    – Shomit
    Jul 18, 2016 at 10:08

Your Answer

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

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