NOTE: This will work only in V9 and not applicable for earlier version (8.x and below)
With the new JS method Xrm.Navigation.openConfirmDialog & Xrm.Navigation.openAlertDialog given in the XRM object of the dynamics 365 v9, we can customize for approval process without third party library like Alert.JS
With the new JS method Xrm.Navigation.openConfirmDialog & Xrm.Navigation.openAlertDialog given in the XRM object of the dynamics 365 v9, we can customize for approval process without third party library like Alert.JS
For Example, If you want to send an Quote for Approval process
and get the outcome(approved/Rejected), then follow the below steps.
1.Create a two buttons 1.Request Approval 2. Approve and an OptionSet (new_ApprovalStatus)with values (1. Approval Requested 2. Approved 3. Rejected).
2.By Setting Display rule, Show “Approve” button upon change of OptionSetValue to “Approval Requested”
3.Upon click on the “Request Approval” button Set the Value to “Approval Requested” using below code
function RequestApproval () {
debugger;
Xrm.Page.getAttribute("new_approvalstatus").setValue(100000000);
Xrm.Navigation.openAlertDialog({text:"Quote Sent for Approval"});
}
4.Use the below code for Approval Button.
function ApproveQuote() {
debugger;
var ConfirmString = {
text: "Are you sure want to Approve?",
title: "Confirmation Alert",
subtitle:" This Quote is requested for your approval",
confirmButtonLabel:"Approve",
cancelButtonLabel: "Reject"
};
var OptionalParameter = { height: 200, width: 400 };
Xrm.Navigation.openConfirmDialog(ConfirmString, OptionalParameter).then(
function (success) {
if (success.confirmed)
{
Xrm.Page.getAttribute("new_approvalstatus").setValue(100000001);
Xrm.Navigation.openAlertDialog({ text: "You Approved the Request" });
}
else
{
Xrm.Page.getAttribute("new_approvalstatus").setValue(100000002);
Xrm.Navigation.openAlertDialog({text: "You Rejected the Request" });
}
},
function(error){
var ErrorDetails = error.message;
Xrm.Navigation.openAlertDialog({text:ErrorDetails});
});
}
Hope this helps
Iğdır
ReplyDeleteAdana
Karabük
Diyarbakır
Antep
J8UAO1
ağrı
ReplyDeletevan
elazığ
adıyaman
bingöl
5MH
görüntülü.show
ReplyDeletewhatsapp ücretli show
FR55
Malatya Lojistik
ReplyDeleteAntep Lojistik
Urfa Lojistik
Sivas Lojistik
Erzurum Lojistik
67YKE
E2DAE
ReplyDeleteBilecik Parça Eşya Taşıma
Etimesgut Fayans Ustası
Bitget Güvenilir mi
Samsun Evden Eve Nakliyat
Keçiören Parke Ustası
Karaman Parça Eşya Taşıma
Kocaeli Şehir İçi Nakliyat
Çerkezköy Çatı Ustası
Samsun Lojistik
2C1A6
ReplyDeletereferans kodu binance
7347C
ReplyDeleteErgo Coin Hangi Borsada
Sohbet
Bitcoin Kazanma Siteleri
Bitcoin Mining Nasıl Yapılır
Youtube Beğeni Satın Al
Kwai Beğeni Satın Al
Onlyfans Beğeni Hilesi
Okex Borsası Güvenilir mi
Tiktok Beğeni Hilesi
507C1
ReplyDeleteArg Coin Hangi Borsada
Tiktok İzlenme Hilesi
Pitbull Coin Hangi Borsada
Bitcoin Madenciliği Nasıl Yapılır
Chat Gpt Coin Hangi Borsada
Binance Referans Kodu
Coin Kazma
Bitcoin Nasıl Alınır
Periscope Beğeni Hilesi
28F07
ReplyDeletepoocoin
shiba
zkswap
defilama
looksrare
poocoin
bitbox
uwu lend
defillama