-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.UI.EntityForm.getMediaTab
rescocrm edited this page Aug 2, 2024
·
10 revisions
Gets the MediaTab object representing the media tab with given name.
This example demonstrates how to work with media tab if media tab exist on form.
MobileCRM.UI.EntityForm.requestObject(function (entityForm) {
// get media tab by its name
var media = entityForm.getMediaTab("DocumentAction");
// bind media tab operations handlers to button onclick event.
document.getElementById("capturePhoto").onclick = function () {
media.capturePhoto();
};
document.getElementById("selectPhoto").onclick = function () {
media.selectPhoto();
};
document.getElementById("selectFile").onclick = function () {
media.selectFile();
};
document.getElementById("recordAudio").onclick = function () {
media.recordAudio();
};
document.getElementById("recordVideo").onclick = function () {
media.recordVideo();
};
}, MobileCRM.bridge.alert);