Getting a list of Salesforce Files

Hi Chandra, I have attached the page XML below. I have stripped the page back as much as possible. All custom fields have been removed so hopefully this works ok in other orgs.

var params = arguments[0], $ = skuid.$;

var SourceModel = skuid.$M(‘DocumentLinking’);
var selectedIds = ;

//Build the array of linked document Ids, based on the values from the DocumentLinking model
$.each(SourceModel.data,function(i,row){

    selectedIds.push(row.ContentDocumentId);

});

//Filter the ContentDocument model to get the files, but only if there are links
if (selectedIds.length >= 1)
{
var TargetModel = skuid.$M(‘ContentDocument’);
var ConIdsCondition = TargetModel.getConditionByName(‘DocIds’);
TargetModel.setCondition(ConIdsCondition,selectedIds);
TargetModel.updateData();
}


.hidetablefooter .nx-list-footer {
display: none;
}
.progress-indicator .progress-chunk.current .progress-text .step-label {
color: #30ad60;
}

.progress-indicator .progress-chunk.current .progress-text .text-content {
background-color: #30ad61;
color: white;
}

.progress-indicator .progress-chunk.done .progress-text .text-content {
background-color: #ddd;
color: white;
}

.progress-indicator .progress-chunk.done .progress-text .step-label {
color: #dddddd;
}

.progress-indicator .progress-chunk.done .progress-text .indicator-line {
background: #30ad60;
}







DocumentLinking





SelectedOpportunity













{{{Name}}}





SelectedOpportunity












SelectedOpportunity






















































<styl