Now I could successfult create list based on list template but when i saved my list template i could say "Include Content" but when the list created by this code it was empty with no content any ideas ?
function createLists() {
var context = new SP.ClientContext('/groupcompanies/AAC');
var web = context.get_web();
var listInfo = new SP.ListCreationInformation();
listInfo.set_title('ListCreation Test');
listInfo.set_description('photo gallery picture library');
listInfo.set_templateType(SP.ListTemplateType.pictureLibrary);
listInfo.set_templateFeatureId("00BFEA71-52D4-45B3-B544-B1C71B620109");
var list = web.get_lists().add(listInfo);
context.load(list);
context.executeQueryAsync(
function () {
console.log(String.format('List {0} has been created successfully',list.get_title()));
},
function (sender, args) {
console.log("%c Ops!" + args.get_message(),"color:red;");
}
);
}//end createLists