mscrm Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/category/mscrm/ Microsoft Dynamics CRM . Microsoft Power Platform Mon, 22 Jun 2020 17:05:53 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32&ssl=1 mscrm Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/category/mscrm/ 32 32 176351444 Deployment process flow and Access level Distribution for Support client (Non Technical Explanation not the Current Best Practice ) https://microsoftdynamics.in/2020/06/22/deployment-process-flow-and-access-level-distribution-for-support-client-non-technical-explanation-not-the-current-best-practice/ Mon, 22 Jun 2020 16:47:42 +0000 http://microsoftdynamics.in/?p=3771 Deployment process flow and Access level Distribution for Support client
This is just a Generic Flow Sent to one of a Support client to make them understand how deployment with multi Environment (Prod and Non-Prod) are done in Layman Language as we were Seeing constant change on Production by System Users.
No Development or Customization should be done on UAT and PRODUCTION
Customization roles are never Given to System User or System ADMIN. Customization Roles and Credentials will only be with IT, Admin, and Support Team.
Deployment From DEV to UAT and UAT to Production needs to be followed and should only be done by the Support team or Deployment Team
1. Case Number is registered Support Portal
2. All emails follow-up and requirements should contain Case number in Subject.
3. If ticket Require any FIX/CHANGE/DEVELOPMENT, A new Solution Package is created with the Case number in CRM DEV Environment containing all the development or changed components

The post Deployment process flow and Access level Distribution for Support client (Non Technical Explanation not the Current Best Practice ) appeared first on Microsoft Dynamics 365 Blog.

]]>

Below Process or Steps are not to be implemented for all Scenario and doesn't include CDS as well. This is just a Generic Flow Sent to one of a Support client to make them understand how deployment with multi Environment (Prod and Non-Prod) are done in Layman Language as we were Seeing constant change on Production by System Users.

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/Deployment-Process-microsoft-dynamics-365-crm-project-best-practice-managed-solution--scaled.jpg?fit=2560%2C1528&ssl=1

QUICK SUMMARY

  • No Development or Customization should be done on UAT and PRODUCTION
  • Customization roles are never Given to System User or System ADMIN. Customization Roles and Credentials will only be with IT, Admin, and Support Team.
  • Deployment From DEV to UAT and UAT to Production needs to be followed and should only be done by the Support team or Deployment Team
    1. Case Number is registered Support Portal
    2. All emails follow-up and requirements should contain Case number in Subject.
    3. If ticket Require any FIX/CHANGE/DEVELOPMENT, A new Solution Package is created with the Case number in CRM DEV Environment containing all the development or changed components
    4. Once unit testing is done of DEV by the Support team, Solution Package will be moved to UAT.
    5. After UAT Deployment, System User will be informed to Test Fix and change.
    6. If System User Failed the Testing, Fix will be done in Dev first and then only moved to UAT for retesting
    7. If the System User Test is Successful, the Support team will send Deployment Document with Required component and Fix details
    8. Once the Document is signed by System User, the Support team will Deploy Solution from UAT TO DEV.
    9. Validation will be done by the Support team and Confirmation will be sent once done.
  • Once Deployment is done, or the Issue has been resolve Case will be closed.

Deployment Process (Again for Non-Technical System Users)

Microsoft dynamics 365 CRM ProjectName has multiple instances i.e. DEV,UAT and PRODUCTION and support/dev team need continuous fixes/development releases to Production and as explained in below process,

  1. Development can only be done in DEV that can include
    – Entity, Fields, Relationship, Optionsets
    – System + Custom Templates
    – Process/Flow/Codes/business rule/web resources
    – Security roles, Field Security, Reports, System Settings, Configurations
    – Forms, views, charts, dashboards, Sitemap
    – E.T.C
  2. No Development or customization can be done on UAT: UAT is for Integration + process + Performance testing
    – All Customization + Confirmations need to be moved from DEV to UAT using Solution Package and Configuration Migration
    – Can only Map Transaction data to Configurations Example In Approval Process actual or test Approvers user can be mapped in UAT
    – No Dashboard Change, No Charts Change, No Configuration change, No field mandatory non-mandatory Change,No security role change, No email Template, No Workflow Change, No Field Creation, No Report change, No System Settings, No System or Custom views changes can be done directly on UAT
  1. PRODUCTION: All customization + configurations need to be moved from UAT to PROD using Solution and configuration migration package deployment.
    No Development or Customizations of any type can be done on Production
    NOTE: To prevent this as per standards, Customization roles are never Given to System User or System ADMIN. Customization Roles and Credentials can only be with the IT Admin and Support Team and can only be used in the presence of the Support Team.
    Also, Customization Role Removal doesn’t remove Charts, Dashboard or advance find Rights. System admin can still be Accessible by system admin.

Key Roles and Permissions on Environments

Below are the issues/Problems which can occur if we don’t follow standard Deployment process and Stockholder Access Levels

  1. For smooth DEV -> UAT -> PROD Fix deployment i.e to prevent solution errors and issues post-deployment.
  2. Prevent Missing Dependencies and overwriting existing important customization
  3. GUID can be different which can break integration or approval process
  4. Performance issue
  5. Troubleshooting can take more time than usual and Downtime can increase so user cannot access Production
  6. Unequal multiple environments will result in no Fix Deployment and unexpected system behaviors and would be difficult to troubleshoot

Below are the Stockholders, Login Access and Permission as per standards

 

The post Deployment process flow and Access level Distribution for Support client (Non Technical Explanation not the Current Best Practice ) appeared first on Microsoft Dynamics 365 Blog.

]]>
3771
Update and delete entities using the Web API Dynamics 365 V9 https://microsoftdynamics.in/2018/01/15/update-and-delete-entities-using-the-web-api-dynamics-365-v9/ Mon, 15 Jan 2018 12:17:00 +0000 Follow link to “Retrieve multiple entity record using Web API ” above step is required to understand the how to connect with Dynamics 365 using Web API. for update we can use SendAsync ———————————————————————————- JObject content= new JObject();                     content.Add(“statuscode”, “100000000”);          ...

The post Update and delete entities using the Web API Dynamics 365 V9 appeared first on Microsoft Dynamics 365 Blog.

]]>
Follow link to “Retrieve multiple entity record using Web API ” above step is required to understand the how to connect with Dynamics 365 using Web API.

for update we can use SendAsync

———————————————————————————-

JObject content= new JObject();
                    content.Add(“statuscode”, “100000000”);
                    content.Add(“statecode”, “0”);

                    content.Add(“new_name”,“name”);

 HttpRequestMessage updateRequest2 = new HttpRequestMessage(new HttpMethod(“PATCH”),  “[Organization URL]api/data/v9.0/new_test(00000000-0000-0000-0000-000000000001)?$select=new_testid,statuscode,statecode,sab_name”  );
                        updateRequest2.Content = new StringContent(Content.ToString(),Encoding.UTF8, “application/json”);
                        HttpResponseMessage updateResponse1 = httpClient.SendAsync(updateRequest2).Result;
                        if (updateResponse1.IsSuccessStatusCode)
                        {
                            //Get the response content  and parse it.
                           JObject body = new JObject();
                            body.Add(“success”, “true”);
                            return body;
                        }
                        else
                        {
                            throw new Exception(“error”);

                        }

————————————————————————————–

Hope this helped. thanks

SOURCE : mscrm.com

The post Update and delete entities using the Web API Dynamics 365 V9 appeared first on Microsoft Dynamics 365 Blog.

]]>
2747
Parse JSON in C# (without Newton JSON) specially for Dynamics 365 CRM V9 https://microsoftdynamics.in/2018/01/15/parse-json-in-c-without-newton-json-specially-for-dynamics-365-crm-v9/ Mon, 15 Jan 2018 10:50:00 +0000 Below is the Json from which i need to get  “Name”, “Email ID” and “Phone number” , Please use https://jsonformatter.curiousconcept.com/ for JSON Formatter. {'context':{'agent':{'name':'manish'},'customer':{'browserType':'Chrome','os':'WINDOWS'},'chat':{'prechatSurvey':[{'question':'What is your name?','answer':'manish'},{'question':'Phone Number','answer':'9393939384'},{'question':'Email Address','answer':'manish@gmail.com'}]}}} 1. Context is root list object public class RootObject     {         public Context context { get; set; }     } 2. As you can see...

The post Parse JSON in C# (without Newton JSON) specially for Dynamics 365 CRM V9 appeared first on Microsoft Dynamics 365 Blog.

]]>
Below is the Json from which i need to get  “Name”, “Email ID” and “Phone number” , Please use https://jsonformatter.curiousconcept.com/ for JSON Formatter.

{'context':{
'agent':{'name':'manish'},
'customer':{'browserType':'Chrome','os':'WINDOWS'},
'chat':{'prechatSurvey':[{'question':'What is your name?','answer':'manish'},{'question':'Phone Number','answer':'9393939384'},{'question':'Email Address','answer':'manish@gmail.com'}]}}
}

1. Context is root list object

public class RootObject
    {
        public Context context { get; set; }
    }

2. As you can see under Context there are 3 more list ‘agent , ‘customer’ and ‘chat’

  public class Context
    {
        public Agent agent { get; set; }
        public Customer customer { get; set; }
        public Chat chat { get; set; }
    }
3. Now Chat has list object,
  public class Agent
    {
        public string name { get; set; }
    }
    public class Customer
    {
        public string browserType { get; set; }    
        public string os { get; set; }
    }

4. Now ‘Chat’ has a list ‘prechatSurvey’

public class Chat
    {
        public List<PrechatSurvey> prechatSurvey { get; set; }
    }
5. ‘prechatSurvey’ contain Question and answer required
public class PrechatSurvey
    {
        public string question { get; set; }
        public string answer { get; set; }
    }

Now we can parse the JSON and get required value, please refer below code
 ———————————————————————————————–
   class Program

    {
        static void Main(string[] args)
        {
            var parameterValue1 = “{‘context’:{‘agent’:{‘name’:’manish’},’customer’:{‘browserType’:’Chrome’,‘os’:’WINDOWS’},’chat’:{‘prechatSurvey’:[{‘question’:’What is your name?’,’answer’:’manish’},{‘question’:’Phone Number’,’answer’:’9211151304′},{‘question’:’Email Address’,’answer’:’manishch@gmail.com‘}]}}}”;
            string fullname = string.Empty;
            string Phonenumber = string.Empty;
            string emailID = string.Empty;
            string message = string.Empty;
            byte[] result = Encoding.UTF8.GetBytes(parameterValue1.Replace(“‘”, “””));
            using (var jsonReader = JsonReaderWriterFactory.CreateJsonReader(result, XmlDictionaryReaderQuotas.Max))
            {
                var outputSerialiser = new DataContractJsonSerializer(typeof(RootObject));
                RootObject output = (RootObject)outputSerialiser.ReadObject(jsonReader);
                List<PrechatSurvey> prechatSurveyList = output.context.chat.prechatSurvey;
                foreach (PrechatSurvey prechatSurvey in prechatSurveyList)
                {
                    string question = prechatSurvey.question;
                    switch (question)
                    {
                        case “What is your name?”:
                            fullname = prechatSurvey.answer;
                            break;
                        case “Phone Number”:
                            Phonenumber = prechatSurvey.answer;
                            break;
                        case “Email Address”:
                            emailID = prechatSurvey.answer;
                            break;                      
                        default:
                            break;
                    }
                }
            }
           
        }
    }
    public class Agent
    {
        public string name { get; set; }
    }
    public class Customer
    {
      
        public string browserType { get; set; }    
        public string os { get; set; }
    }
    public class PrechatSurvey
    {
        public string question { get; set; }
        public string answer { get; set; }
    }
    public class Chat
    {
        public List<PrechatSurvey> prechatSurvey { get; set; }
    }
    public class Context
    {
        public Agent agent { get; set; }
        public Customer customer { get; set; }
        public Chat chat { get; set; }
    }
    public class RootObject
    {
        public Context context { get; set; }
    }
}
—————————————————————————————-
Hope this was Helpfull .thanks

SOURCE : mscrm.com

The post Parse JSON in C# (without Newton JSON) specially for Dynamics 365 CRM V9 appeared first on Microsoft Dynamics 365 Blog.

]]>
2749
Method Xrm.Page.ui.formSelector does not work in tablet and mobile device. Use getClient() in Dynamics 365 , MS CRM https://microsoftdynamics.in/2017/10/11/method-xrm-page-ui-formselector-does-not-work-in-tablet-and-mobile-device-use-getclient-in-dynamics-365-ms-crm/ Wed, 11 Oct 2017 07:51:00 +0000 http://microsoftdynamics.in/2017/10/11/method-xrm-page-ui-formselector-does-not-work-in-tablet-and-mobile-device-use-getclient-in-dynamics-365-ms-crm/ Below are some of the examples that will not work in tablets when using MSCRM Xrm.Page.context.� getCurrentTheme Xrm.Page.ui� ViewPort Methods Xrm.Page.data.entity.� getDataXml Xrm.Page.ui control� Web resource and IFRAME control methods Xrm.Page.ui.� formSelector object methods Xrm.Page.ui tab.� setDisplayState Xrm.Page.ui.� navigation.items collection Xrm.Utility.� openWebResource Xrm.Page.ui.� refreshRibbon When these method are executed in Tablet or mobile device then these will return nothing and defining will return undefined. So  if...

The post Method Xrm.Page.ui.formSelector does not work in tablet and mobile device. Use getClient() in Dynamics 365 , MS CRM appeared first on Microsoft Dynamics 365 Blog.

]]>
Below are some of the examples that will not work in tablets when using MSCRM

Xrm.Page.context. getCurrentTheme Xrm.Page.ui ViewPort Methods
Xrm.Page.data.entity. getDataXml Xrm.Page.ui control Web resource and IFRAME control methods
Xrm.Page.ui. formSelector object methods Xrm.Page.ui tab. setDisplayState
Xrm.Page.ui. navigation.items collection Xrm.Utility. openWebResource
Xrm.Page.ui. refreshRibbon

When these method are executed in Tablet or mobile device then these will return nothing and defining will return undefined.

So  if we are customization it for tablet we should distinguish the client device in JS and write code .
var isCrmForTablets = (Xrm.Page.context.client.getClient() == “Mobile”)
if (isCrmForTablets)
{
// Code for CRM for tablets only goes here,
}
else
{
// Code for web browser or CRM for Outlook only goes here.
}
// Code for any client goes here.
 
To make sure which commands will work in tablet then include a command rule for more info refer Here.

Hope it will help. thanks

SOURCE : mscrm.com

The post Method Xrm.Page.ui.formSelector does not work in tablet and mobile device. Use getClient() in Dynamics 365 , MS CRM appeared first on Microsoft Dynamics 365 Blog.

]]>
2774
ERROR 401 Unauthorized Access is Denied in mscrm Claims Based Authentication https://microsoftdynamics.in/2017/07/30/error-401-unauthorized-access-is-denied-in-mscrm-claims-based-authentication/ Sat, 29 Jul 2017 20:50:00 +0000 http://microsoftdynamics.in/2017/07/30/error-401-unauthorized-access-is-denied-in-mscrm-claims-based-authentication/ Last Sunday my client was unable to login to the CRM and was showing below error : HTTP Error 401 – Unauthorized Access is denied. I checked and found this error is of claims based authentication or IFD.  It was working fine from past 90 days but i just followed the below Microsoft article and error...

The post ERROR 401 Unauthorized Access is Denied in mscrm Claims Based Authentication appeared first on Microsoft Dynamics 365 Blog.

]]>
Last Sunday my client was unable to login to the CRM and was showing below error :

HTTP Error 401 – Unauthorized Access is denied.


I checked and found this error is of claims based authentication or IFD. 

It was working fine from past 90 days but i just followed the below Microsoft article and error was resolved.

Cause mentioned  :  
The Token-signing certificate and Token-Decrypting certificate in ADFS will automatically be renewed by the Auto Certificate Rollover feature because these certificates reach their expiration date.

Microsoft KB Article : Click Here 

The post ERROR 401 Unauthorized Access is Denied in mscrm Claims Based Authentication appeared first on Microsoft Dynamics 365 Blog.

]]>
2781
Set only contact entity or only Account entity customer field lookup in case / Opportunity for ms crm https://microsoftdynamics.in/2016/03/11/set-only-contact-entity-or-only-account-entity-customer-field-lookup-in-case-opportunity-for-ms-crm/ Fri, 11 Mar 2016 10:01:00 +0000 http://microsoftdynamics.in/2016/03/11/set-only-contact-entity-or-only-account-entity-customer-field-lookup-in-case-opportunity-for-ms-crm/ Set potential customer look up field to only for contact entity record. By default out of the box functionality gave a pop up with two entity type -contact & account for customer lookup field , if your requirement is to set only contact or only account as entity it can be done using javascript as...

The post Set only contact entity or only Account entity customer field lookup in case / Opportunity for ms crm appeared first on Microsoft Dynamics 365 Blog.

]]>

Set potential customer look up field to only for contact entity record.

By default out of the box functionality gave a pop up with two entity type -contact & account for customer lookup field ,
if your requirement is to set only contact or only account as entity it can be done using javascript as given below ,

Both Contact and Account are viewed by Default 

Only Contact records are views
Only Contact is selected and read only

Both account and contact shown by default 
function disableaccountfromcustomer() {
debugger;
//timeout of 1sec
    setTimeout(function () {
debugger;
        var getid = $(‘#customerid_i’); //customer field id contain account and contact both view
        getid .attr(‘defaulttype’, ‘2’); // default advance find entity type to contact
        getid .attr(‘lookuptypes’, ‘2’); //change lookup view to contact
    }, 1000);

}

SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post Set only contact entity or only Account entity customer field lookup in case / Opportunity for ms crm appeared first on Microsoft Dynamics 365 Blog.

]]>
2784
ERROR : The specified user is either disabled or is not a member of any business unit in Microsoft Dynamics CRM while activating workflow or saving a record ( The System Could not log you on. This could be because your user record or the business unit you belong to has been disabled in microsoft Dynamics CRM ) https://microsoftdynamics.in/2015/11/16/error-the-specified-user-is-either-disabled-or-is-not-a-member-of-any-business-unit-in-microsoft-dynamics-crm-while-activating-workflow-or-saving-a-record-the-system-could-not-log-you-on-this-cou/ Mon, 16 Nov 2015 15:24:00 +0000 http://microsoftdynamics.in/2015/11/16/error-the-specified-user-is-either-disabled-or-is-not-a-member-of-any-business-unit-in-microsoft-dynamics-crm-while-activating-workflow-or-saving-a-record-the-system-could-not-log-you-on-this-cou/ While activating one draft workflow,  i was getting an error . The System Could not log you on. This could be because your user record or the business unit you belong to has been disabled in Microsoft Dynamics CRM  This happened because of following  : 1. Workflow owner user is deactivated , change the user or activate the one and...

The post ERROR : The specified user is either disabled or is not a member of any business unit in Microsoft Dynamics CRM while activating workflow or saving a record ( The System Could not log you on. This could be because your user record or the business unit you belong to has been disabled in microsoft Dynamics CRM ) appeared first on Microsoft Dynamics 365 Blog.

]]>
While activating one draft workflow,  i was getting an error .

The System Could not log you on. This could be because your user record or the business unit you belong to has been disabled in Microsoft Dynamics CRM 

This happened because of following  :
1. Workflow owner user is deactivated , change the user or activate the one and activate the workflow .
2. If error is coming while saving a record , the plugin or workflow might be executing under user context and that user is no longer enabled , either change the context to organization ( for workflow) 


SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post ERROR : The specified user is either disabled or is not a member of any business unit in Microsoft Dynamics CRM while activating workflow or saving a record ( The System Could not log you on. This could be because your user record or the business unit you belong to has been disabled in microsoft Dynamics CRM ) appeared first on Microsoft Dynamics 365 Blog.

]]>
2787
Get Server URL or IP using JavaScript in MSCRM 2011 , MSCRM 2013 , MSCRM 2015 https://microsoftdynamics.in/2015/06/10/get-server-url-or-ip-using-javascript-in-mscrm-2011-mscrm-2013-mscrm-2015/ Wed, 10 Jun 2015 12:55:00 +0000 http://microsoftdynamics.in/2015/06/10/get-server-url-or-ip-using-javascript-in-mscrm-2011-mscrm-2013-mscrm-2015/ Some time we need to get server IP  instead of Server URL Like when we need to write Odata Query in dev and frequently sift Solution from dev to production , it imp to get Ip dynamically so , you Odata don’t give error . // Simple Server Url using JavaScript var serverUrl = Xrm.Page.context.getServerUrl();...

The post Get Server URL or IP using JavaScript in MSCRM 2011 , MSCRM 2013 , MSCRM 2015 appeared first on Microsoft Dynamics 365 Blog.

]]>
Some time we need to get server IP  instead of Server URL Like when we need to write Odata Query in dev and frequently sift Solution from dev to production , it imp to get Ip dynamically so , you Odata don’t give error .
// Simple Server Url using JavaScript
var serverUrl = Xrm.Page.context.getServerUrl();
//Work fine for both IP And server

var serverUrl = document.location.protocol + “//” + document.location.host + “/” + Xrm.Page.context.getOrgUniqueName();

This Above code will work fine for both Server IP or Url as when we access mscrm record with only server name ( but our odata code contain ip it will throw an exception ) or if we access with IP ans our code contain server url so to prevent this we can use above code to get dynamic URL address.

SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post Get Server URL or IP using JavaScript in MSCRM 2011 , MSCRM 2013 , MSCRM 2015 appeared first on Microsoft Dynamics 365 Blog.

]]>
2797
Set Field Read Only Using JavaScript In MSCRM ( Lock Field in MS CRM ) https://microsoftdynamics.in/2015/02/20/set-field-read-only-using-javascript-in-mscrm-lock-field-in-ms-crm/ Fri, 20 Feb 2015 10:19:00 +0000 http://microsoftdynamics.in/2015/02/20/set-field-read-only-using-javascript-in-mscrm-lock-field-in-ms-crm/ Hey Below is the Code To Set a Attribute / field on form Read only (Lock) using JavaScript in MS CRM . // Get Control of entity Xrm.Page.ui.controls.get(“new_companyreference”); // Now set the property to lock the field ToBeReadOnlyControl.setDisabled(true); Note : Xrm.Page.ui.controls.get(“new_companyreference”); by this we get full UI controls of the attribute / field by which we...

The post Set Field Read Only Using JavaScript In MSCRM ( Lock Field in MS CRM ) appeared first on Microsoft Dynamics 365 Blog.

]]>

Hey Below is the Code To Set a Attribute / field on form Read only (Lock) using JavaScript in MS CRM .
// Get Control of entity
Xrm.Page.ui.controls.get(“new_companyreference”);
// Now set the property to lock the field

ToBeReadOnlyControl.setDisabled(true);
Note : Xrm.Page.ui.controls.get(“new_companyreference”); by this we get full UI controls of the attribute / field by which we can set or get any ui property of that field .

SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post Set Field Read Only Using JavaScript In MSCRM ( Lock Field in MS CRM ) appeared first on Microsoft Dynamics 365 Blog.

]]>
2801
PREVENT , STOP SAVE FORM OPERATION USING JAVASCRIPT IN MS CRM 2013 (prevent form from save ms crm) https://microsoftdynamics.in/2014/12/19/prevent-stop-save-form-operation-using-javascript-in-ms-crm-2013-prevent-form-from-save-ms-crm/ Fri, 19 Dec 2014 11:40:00 +0000 http://microsoftdynamics.in/2014/12/19/prevent-stop-save-form-operation-using-javascript-in-ms-crm-2013-prevent-form-from-save-ms-crm/ WHEN YOU WANT TO ABORT AN SAVE OPERATION IN MS CRM , WE CAN USE THIS JAVASCRIPT TO STOP SAVE OPERATION IN MS CRM    context.getEventArgs().preventDefault(); 1. FIRST ADD A WEB-RESOURCE PASSING PARAMETER . function checkbox(context) {     var innerhtmls = Xrm.Page.ui.tabs.get(“{cab6696b-b74a-47a4-b278-fc07fe780565}” ).sections.get( “Sec_IdProof”).$1l_0.innerHTML;     var checkedis = innerhtmls.match( /defaultvalue=”1″/g );     if (checkedis == null) {         alert( “Please Select An Address Proof && An ID Prooof” );...

The post PREVENT , STOP SAVE FORM OPERATION USING JAVASCRIPT IN MS CRM 2013 (prevent form from save ms crm) appeared first on Microsoft Dynamics 365 Blog.

]]>
WHEN YOU WANT TO ABORT AN SAVE OPERATION IN MS CRM , WE CAN USE THIS JAVASCRIPT TO STOP SAVE OPERATION IN MS CRM

   context.getEventArgs().preventDefault();

1. FIRST ADD A WEB-RESOURCE PASSING PARAMETER .

function checkbox(context) {

    var innerhtmls = Xrm.Page.ui.tabs.get(“{cab6696b-b74a-47a4-b278-fc07fe780565}” ).sections.get( “Sec_IdProof”).$1l_0.innerHTML;
    var checkedis = innerhtmls.match( /defaultvalue=”1″/g );

    if (checkedis == null) {
        alert( “Please Select An Address Proof && An ID Prooof” );
        
        context.getEventArgs().preventDefault();
    }
}

2. CHECK THE CHECKBOX ( PASS EXECUTION CONTEXT  AS FIRST PARAMETER )

References


SOURCE : JUST2CODE.IN
Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post PREVENT , STOP SAVE FORM OPERATION USING JAVASCRIPT IN MS CRM 2013 (prevent form from save ms crm) appeared first on Microsoft Dynamics 365 Blog.

]]>
2819