Add Camera Photo support

Download Camera Sample
Config.appid = "myappid";
Config.uses = "Files"; // need this to make a call for the Standard File app to view the photo.
Config.tables["leads"] = "id;name";

function viewLead(id) {
    var lead = Query.selectId("leads", id);
    Toolbar.setTitle("Lead Info");
    List.addItemTitle(lead.name);

    List.addButton("Add Photo", "App.takePicture('myappid.leads',{id})");
    var files = Query.select("system.files", "id;name;date", "linkedtable='myappid.leads' AND linkedrecid={id}", "date");
    List.addHeader("Photos (" + files.length + ")");
    for (var i = 0; i < files.length; i++) {
        var file = files[i];
        var img = Settings.getFileUrl(file.id);
        List.addItem(Format.datetime(file.date), "Files.viewFile({file.id})", "scale:crop;img:" + img);
    }
    List.show();
}