Hi,
I have a form in crm 2015. When it is loaded a sweet alert can be seen in the attachment. The same sweet alert message can't be seen in the form load part in crm 2016 . The code is below. I added "parent." part to the $("") sentences. Because without of parent. word the javascript code does not work in Crm 2016.
I reed the sweet alert info from here: http://t4t5.github.io/sweetalert/ My problem is: how can i see the sweat alert?
As you can in the form library the below code is in the new_quote_form library. Can anyone help me please?
try {
if (sweetAlertCss_Loaded == undefined || sweetAlertCss_Loaded == null) {
alert("içinde");
var _css = "WebResources/new_SweetAlertCss";
var _cssref = document.createElement("link");
_cssref.setAttribute("rel", "stylesheet");
_cssref.setAttribute("type", "text/css");
_cssref.setAttribute("href", _css);
alert(_cssref);
parent.$("head").append(_cssref);
var sweetAlertCss_Loaded = true;
}
swal({
title: 'Teklif veya Direk Satis?',
text: 'Lütfen olusturmak istediginiz kayit türünü seçiniz !',
type: 'warning',
allowEscapeKey: false,
showCancelButton: true,
cancelButtonColor: '#DD6B55',
confirmButtonColor: '#d33',
cancelButtonText: 'Teklif',
confirmButtonText: 'Dogrudan Satis',
closeOnConfirm: false
},
function (isConfirm) {
// isConfirm == true = Siparis else Teklif
getAttr("new_direktsatis").setValue(isConfirm);
getAttr("new_tur").setValue(isConfirm ? 100000001 : 100000000);
if (isConfirm) {
getField("new_uretimtarihi").setRequiredLevel("required");
getField("new_kesinteslimtarihi").setRequiredLevel("required"); //"none", "required", "recommended"
Xrm.Page.getControl("new_uretimtarihi").setVisible(true);
Xrm.Page.getControl("new_kesinteslimtarihi").setVisible(true);
}
if (getField("new_tur").getValue() != 100000001) {
//var elm = document.getElementById("Odeme_d");if (elm) elm.style.display = "none";
hatirlatmaTarihiniAyarla();
toggleTab(false, "tab_odeme");
}
swal.close();
//swal((e) ? 'Dogrudan siparis seçenegi seçildi' : 'Teklif olusturma seçenegi seçildi');
});
} catch (e) { alert("teklifDirekSatisSecimi error:" + e); }
*This post is locked for comments