In below example, I have implemented custom filter on Student Course Lookup. This filter is forcing the student courses to show for the given Student Id. Student Id is mapped as single line of text field so default filter functionality can not be implemented for Student Course Lookup.
Technical Solutions, Software Development, MS Dynamics CRM Customization, Development, Report Development
Friday, November 6, 2015
Lookup Filter Through XRM
In below example, I have implemented custom filter on Student Course Lookup. This filter is forcing the student courses to show for the given Student Id. Student Id is mapped as single line of text field so default filter functionality can not be implemented for Student Course Lookup.
Wednesday, September 16, 2015
Entity Home - Bind Javascript function on Custom Button
This technique work to bind java script function in entity home page.
https://rajeevpentyala.wordpress.com/2012/05/23/loading-dependent-jscript-libraries-in-ribbon-buttons-execution-crm-2011/
#AW CRM Consultant Maison Consulting & Solutions
https://rajeevpentyala.wordpress.com/2012/05/23/loading-dependent-jscript-libraries-in-ribbon-buttons-execution-crm-2011/
The solution is simple. We can add all the required libraries to <Actions> node like below
<JavaScriptFunction Library=”$webresource:common” FunctionName=”isNaN” />Note – Since <JavaScriptFunction> requires a function name, pass “isNaN”.
Now my <Actions> node look like below
<Actions><JavaScriptFunction Library=”$webresource:account_ribbon” FunctionName=”sayHello”></JavaScriptFunction><JavaScriptFunction Library=”$webresource:common” FunctionName=”isNaN”></JavaScriptFunction></Actions>
#AW CRM Consultant Maison Consulting & Solutions
Load Multiple JavaScript Libraries
Loading dependent jscript libraries in ribbon button’s execution CRM 2011
<Actions>
<JavaScriptFunction Library=”$webresource:account_ribbon” FunctionName=”sayHello”>
</JavaScriptFunction>
<JavaScriptFunction Library=”$webresource:common” FunctionName=”isNaN”>
</JavaScriptFunction>
</Actions>
Microsoft CRM syntax for common jscript requirements
JavaScript Reference for Microsoft Dynamics CRM 2011
2013
Tuesday, September 15, 2015
IFrame Set Src
IFrame src can be set on Form Load event, but this technique not work all time as On Load can be complete before loading IFrame. In this case, IFrame Url set to its default value.
The work around is to set IFrame Src in IFrame Event Handler on 'readystatechange' event.
So, add webresource library on form and register the function on IFrame event handler to set the Src.
In below code, I have register IFrame function on IFrame event handler. Now my IFrame Url set successfully.
Wednesday, September 9, 2015
Disable Pending Email Warning Message
CRM show pending email warnings when there are pending emails. For some reason you have created an email message, tried to send it but it never got sent and is stuck in pending. To get rid of these annoying warnings, I have found two methods mentioned below.
Method 1) Using Advance Find
Do an advanced find and search for email messages where you are the owner and the status is Pending Send.
Friday, August 21, 2015
CRM 2013 Quick Create Form Mapping Bug
There is bug in Contact Quick Create Form on lead form. Once contact form is opened without first selecting the Existing Account, it no more map Parent Account on contact form.
This issue is reported in several blogs including Microsoft official community.
https://community.dynamics.com/crm/f/117/t/143653
#AW
Dynamics CRM Consultant
Saturday, August 8, 2015
Allow Posts in Social Pane CRM 2013
If Posts tab is not showing in Social Pane, then go to Settings-> Post Configurations tab, as shown in snap shot.
select relevant entity. Now activate/publish entity.This will activate the Posts tab in Social Pane on Entity Form.
If Post Configuration tab is not showing in setings area, then you have to edit the sitemap of CRM. This usually happen due to up-gradation from CRM 2011 to CRM 2013.
Ali Wadood
Dynamics CRM Consultant Maison Consulting & Solutions
Friday, August 7, 2015
Hide Business Process Flow Based on Condition
Requirement: Business Process require to hide Business Process Flow on Opportunity Form if Opportunity Type is Consumer. In below Xrm code I have apply this business process requirement.
Opportunity is not Consumer:
Opportunity is Consumer:
Xrm Code
-- Code on Form Load
Hiding BPF if Opportunity Type is Consumer Opportunity i.e equal to 4
Wednesday, July 15, 2015
Monday, July 13, 2015
Implement Business Logic on Lead Disqualify
Whenever you disqualify the lead it save the Lead form, so you can have JS registered on save event to check if user initiated action to disqualify lead
In this case you need to check for savemode() equal to 15 on save event of lead
execObj.getEventArgs().getSaveMode()
Entity Event Mode Value AllSave1AllSave and Close2AllSave and New59AllAutoSave70ActivitiesSave as Completed58AllDeactivate5AllReactivate6User or Team owned entitiesAssign47Email (E-mail)Send7LeadQualify16LeadDisqualify15
Wednesday, July 8, 2015
Prevent Delete on Desired Condition - CRM 2013 Plugin
Scenario: XYZ Pvt Ltd, wants to implement business logic of Delete prevention if value of Is Delete Field is No on Opportunity Entity. CRM 2013 will prevent deltetion of record if value of Is Delete Field is set to No and vice versa.
Work Around: We have added a custom field on Opportunity Entity with Display name 'Is Delete' & Schema Name 'IsDelete'.
Solution: Below is the CRM 2013 Prevent Delete Plugin code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Crm.Sdk.Messages;
namespace PreventAccountDelete
{
public class Class1:IPlugin
{
Monday, July 6, 2015
XRM - Move to Next Stage in Business Process Flow
Here is the XRM code to move to next stage in Business Process Flow on desired condition. Add this code on ribbon button. If you want to add this code on Form save, then implement your logic of 'OnSave' accordingly.
Below code is using Opportunity entity. Other desired entities can be passed in successCallback function.
function MoveNextStage(stageToMove) {
Thursday, July 2, 2015
Add Dynamic Ribbon Menu Buttons
1) Create Ribbon Menu Buttons using (Ribbon Workbench)
2) Add Enable Rules in Ribbon Workbench
- For each Rule Add a Custom Rule and Select Custom Javascript Rule
- Now mention your function name and web-resource.
3) Connect Rules with Commands
4) Add the functions in Web-Resource as mentioned in Specified Rules in Step 2.
5) For Enable Button Return True and to Disable the Button, Return False.
#AW Customization Consultant Maison Consulting & Solutions
Wednesday, July 1, 2015
CRM 2013 Icons
Below are the links provide CRM 2013 icons.
http://flaticons.net/category.php?c=Shopping
https://curah.microsoft.com/74102/free-icons-for-dynamics-crm-2011-and-2013
Get Icons of Customized Size
#AW Customization Consultant Maison Consulting & Solutions
Tuesday, June 16, 2015
Branching in Business Process Flows (CRM 2015)
Business process flows guide you through various stages of sales, marketing, or service processes toward completion. In simple cases, a linear business process flow is a good option. However, in more complex scenarios, you can enhance a business process flow with branching. If you have the create permissions on business process flows, you’ll be able create business process flow with multiple branches by using the If-Else logic. The branching condition can be formed of multiple logical expressions that use a combination of AND or OR operators.
Tuesday, June 2, 2015
Class Library for CRM Fields Schema Names
I am thinking about creating a Class Library to support CRM Fields Schema Names and Data Types in developing Plugins.
Two concepts hitting my mind.
- Make an object oriented style of classes with helper methods in base classes
- Create configurations regarding all schema field names and store them as field properties by creating specific entity classes on the fly.
Hmm, well 2nd point is looking more feasible in such development....
#AW Customization Consultant Maison Consulting & Solutions
Thursday, May 28, 2015
Create and Update Entity Metadata
Create and Update Entity Metadata (Programatically C#)
#AW
Customization Consultant
Maison Consulting & Solutions
Change Entity Primary Field after Entity is Created
Change Entity Primary Field. Below link also provide useful information regarding Entity Metadata & how CRM stores entity attributes and metadata in database.
https://www.it-gems.com/2014/10/change-primary-field-entity-created.html
#AW Customization Consultant Maison Consulting & Solutions
Tuesday, May 26, 2015
Status and Status Reason values in Dynamics CRM 2013
Important info regarding 'Status and Status Reason values in Dynamics CRM 2013' is given in this link.
https://msdynamicscrmblog.wordpress.com/2013/10/26/status-and-status-reason-values-in-dynamics-crm-2013/
#AW Customization Consultant Maison Consulting & Solutions
https://msdynamicscrmblog.wordpress.com/2013/10/26/status-and-status-reason-values-in-dynamics-crm-2013/
#AW Customization Consultant Maison Consulting & Solutions
Friday, April 24, 2015
Thursday, April 16, 2015
Object Properties with Get, Set
var d = Date.prototype;
Object.defineProperty(d, "Year", {
get: function() {return this.getFullYear() },
set: function(y) { this.setFullYear(y) }
});
Above code add property in Date object. This is use of getter and setter in a Date
object: Shown in below lines of code.
var now = new Date;
document.write(now.Year + '<br/>'); // 2015
now.Year = 2016;
document.write(now);
// Sat Apr 16 2016 13:56:25 GMT+0500 (Pakistan Standard Time)
Subscribe to:
Posts (Atom)
Asp.Net MVC (5) - Exception Filter - HandleError
Applicable on Asp.Net MVC5 HandleError Filter This belongs to Exception Filters category (Authentication Filter, Authoriz...
-
Applicable on Asp.Net MVC5 HandleError Filter This belongs to Exception Filters category (Authentication Filter, Authoriz...
-
1) Install Ribbon Workbench from here 2) Import solution in your Dynamics CRM 365 instance 3) A button " RIBBON WORKBENCH 2016 ...