The following returns selected items correctly from standard list and document library types.

var context = SP.ClientContext.get_current();
var items = SP.ListOperation.Selection.getSelectedItems(context);

on the external list it seems to only return the list object itself as the ID returned is that of the external list "__bg01003300730033001300" instead of the list item ID"s.

Is there an alternate method when dealing with External lists? I would not think so since we are still dealing with listview (and I have not found such a reference).

I have hit a road block in terms of other items to verify, I tried from both Chrome and IE with same behavior and on two different farms.

1 Answer 1


With External lists the BDC Identity IS what you want you want in lieu of the traditional list item ID. This is actually in an MSDN reference that I am failing to find to provide a link too.

I was still dealing with the problem of each BDC Identity being duplicates - which is why the getSelectedItems was not working. We resolved this by correcting the external content type. The identity field that was being used was not unique, we corrected this by combining two columns as identify fields to create a unique ID (this is what the BDC Identity column is created from). That resolved the duplicate issue and the getSelectedItem function works as expected.

Take Away:

  1. External Lists use BDC Identity instead of ID
  2. Remember - especially if building read only actions that your identity field(s) need to create a unique identifer for each item you are pulling in.

Your Answer

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

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