Description:
In this example we explain that how to switch business process in Dynamic CRM using JavaScript. Or change the business process flow using JavaScript in Dynamic CRM.or JavaScript code to change or switch business process in Dynamic CRM.
Here we demonstrate
that how to switch Business Process Flow using JavaScript based on Dynamic CRM
form’s field value. We have requirement to switch the business process on Case
Origin like if Case Origin Equal Website then set Business Process like Website
to Case, if Case Origin Equal Email the set Business Process like Email to Case.
So below is
the JavaScript code that demonstrate that how to change or switch Business
Process in Dynamic CRM.
function ChangeBusinessProcess() {
// If
not new Case form
if
(Xrm.Page.ui.getFormType() != 1) {
//
Read Origin Option text
var
origin = Xrm.Page.data.entity.attributes.get("caseorigincode");
if
(origin && origin.getText()) {
var
caseOrigin = origin.getText();
//
Get Business process flow id
var
processFlow1Id = "6CD44946-0DC5-47E3-9B62-6D7309254710";
var
processFlow2Id = "0B3A94CD-CD43-4F49-A9A3-93C4AC684CFA";
//
Get Current Active Process Id
var
activeProcess = Xrm.Page.data.process.getActiveProcess();
var
currProcessId = activeProcess.getId();
if
(caseOrigin.toLowerCase() == "website")
{
// Change the process only if current Active Process not the Target
one
if
(currProcessId.toLowerCase() != processFlow1Id.toLowerCase()) {
// Switch to the "Website to Case"
Xrm.Page.data.process.setActiveProcess(processFlow1Id, myCallBack);
}
} else
if (caseOrigin.toLowerCase() == "email") {
// Change the process only if current Active Process not the Target
one
if (currProcessId.toLowerCase() != processFlow2Id.toLowerCase()) {
// Switch to the "Email to Case"
Xrm.Page.data.process.setActiveProcess(processFlow2Id, myCallBack);
}
}
}
}
}
// Call
back function post Process flow switch
function
myCallBack(response) {
if
(response == "success") {
alert("BPF
changed !!!");
//
Save the form
Xrm.Page.data.entity.save();
}
else
{
alert("Error
changing BPF!!!");
}
}
●Exising without the answers to the difficulties you’ve sorted out through this guide is a critical case, as well as the kind which could have badly affected my entire career if I had not discovered your website.
ReplyDeleteDigital Marketing Training in Chennai
Digital Marketing Training in Bangalore
Digital Marketing Training in Pune
This is a nice post in an interesting line of content.Thanks for sharing this article, great way of bring this topic to discussion.
ReplyDeleteClick here:
python training in velachery
Click here:
python training in OMR
Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
ReplyDeleteData Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....
ReplyDeletepython training institute in marathahalli | python training institute in btm
ReplyDeleteWhen I initially commented, I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove people from that service? Thanks.
Amazon Web Services Training in Pune | Best AWS Training in Pune
AWS Training in Pune | Best Amazon Web Services Training in Pune
Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the wordevops online training
ReplyDeleteaws online training
data science with python online training
data science online training
rpa online training ld wide web.
Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.
ReplyDeletedigital marketing course in chennai
digital marketing training in chennai
I must thank you for the efforts you have put in penning this site. I am hoping to see the same high-grade content from you later on as well. In fact, your creative writing abilities has motivated me to get my very get own website now ;)
ReplyDelete
ReplyDeleteThanks for sharing such a wonderful blog with us. It makes the business develop more and more.
DevOps Training In Hyderabad
Hi, Thanks for sharing really awesome information...
ReplyDeleteData Science Training In Hyderabad
This is excellent blog!!!
ReplyDeleteDigital Marketing Training in Chennai | Certification | SEO Training Course | Digital Marketing Training in Bangalore | Certification | SEO Training Course | Digital Marketing Training in Hyderabad | Certification | SEO Training Course | Digital Marketing Training in Coimbatore | Certification | SEO Training Course | Digital Marketing Online Training | Certification | SEO Online Training Course
I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!.. Keyword
ReplyDeletehardware and networking training in chennai
hardware and networking training in tambaram
xamarin training in chennai
xamarin training in tambaram
ios training in chennai
ios training in tambaram
iot training in chennai
iot training in tambaram
Your technical information related with java programming is very useful and interesting. Also share updated details about java in your website. Thanks for sharing this article.
ReplyDeleteangular js training in chennai
angular js training in velachery
full stack training in chennai
full stack training in velachery
php training in chennai
php training in velachery
photoshop training in chennai
photoshop training in velachery
I really enjoyed reading ur blog. Please kindly update more informative post like that.
ReplyDeletehardware and networking training in chennai
hardware and networking training in annanagar
xamarin training in chennai
xamarin training in annanagar
ios training in chennai
ios training in annanagar
iot training in chennai
iot training in annanagar
Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....
ReplyDeletedata science training in chennai
data science training in omr
android training in chennai
android training in omr
devops training in chennai
devops training in omr
artificial intelligence training in chennai
artificial intelligence training in omr
I really happy found this website eventually. Really informative and inoperative! Thanks for the post and effort! Please keep sharing more such article.
ReplyDeleteDevOps Training in Hyderabad
Nice article and thanks for sharing with us. Its very informative
ReplyDeletePlots in CHITUKULA
Infycle Technologies offers the best Data Science Certification in Chennai and is widely known fots excellence in giving the best Data Science training in Chennai. Providing quality software programming training with 100% placement & to build a solid career for every young professional in the software industry is the ultimate aim of Infycle Technologies. Apart from all, the students love the 100% practical training, which is the specialty of Infycle Technologies. To proceed with your career with a solid base, reach Infycle Technologies through 7502633633r i.Grab Data Science Course in Chennai | Infycle Technologies
ReplyDeleteIs this blog important for business? That's a questionBuy yahoo accounts that I get asked quite frequently and the answer is a resounding yes! This blog has been one of the most powerful tools to increase my online sales dramatically. It's not a blog where I post sad stories or thoughts about my last vacation or what I ate for dinner the night before. Rather, it's a place where I post up relevant articles related to my business that are regularly monitored and updated so that my visitors always stay well informed and up to date on what I'm doing and why.Buy tinder accounts
ReplyDeleteThis article is a guest post on the significance of this post and how important it is for business
ReplyDeleteBuy facebook accounts to post it on their websites. In this post we are going to discuss why it is important for businesses to post a sign up sheet and other important things that one should consider when making this big investment. When making a big investment such as this one is very important to consider all aspects and that is why it is important for business to make sure that they post this on their websites. For those who are not able to make this post or understand its importance you can always check this out at my blog for more information.
Buy snapchat account
This is an informative blog. If you are looking for an online store for appliances. Feel free to visit Brands Direct Online to know more about our products
ReplyDeleteAwesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
ReplyDeleteBuy Gmail Accounts
Buy Gmail Accounts
Really an awesome blog and useful content. Keep updating more blogs again soon. Thank you.
ReplyDeleteBest Data Science Training in Hyderabad
Гадание козерог - это верный метод узнать судьбу с применением каких-либо объектов и средств. Потусторонние силы и всевозможные способы ворожения научно не доказаны, но все же различные люди в них верят. Номенклатура деяний, сориентированных на предвидение будущего, отмечают как хиромантия.
ReplyDelete