in ms crm Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/in-ms-crm/ Microsoft Dynamics CRM . Microsoft Power Platform Fri, 11 Mar 2016 10:01:00 +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 in ms crm Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/in-ms-crm/ 32 32 176351444 Set only contact entity or only Account entity customer field lookup in case / Opportunity for ms crm http://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
Insert Hyperlink in Email using workflow in ms crm 2013 , mscrm , Microsoft Dynamics CRM http://microsoftdynamics.in/2015/11/16/insert-hyperlink-in-email-using-workflow-in-ms-crm-2013-mscrm-microsoft-dynamics-crm/ Mon, 16 Nov 2015 16:00:00 +0000 http://microsoftdynamics.in/2015/11/16/insert-hyperlink-in-email-using-workflow-in-ms-crm-2013-mscrm-microsoft-dynamics-crm/ Below are the steps to add hyperlink in Email using workflow in ms crm . 1. open workflow add Send Email Step 2.  Now click on ICON to add details url etc.  Now hyperlink URL will be available in Email. SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

The post Insert Hyperlink in Email using workflow in ms crm 2013 , mscrm , Microsoft Dynamics CRM appeared first on Microsoft Dynamics 365 Blog.

]]>
Below are the steps to add hyperlink in Email using workflow in ms crm .

1. open workflow add Send Email Step

2.  Now click on ICON to add details url etc. 

Now hyperlink URL will be available in Email.


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

The post Insert Hyperlink in Email using workflow in ms crm 2013 , mscrm , Microsoft Dynamics CRM appeared first on Microsoft Dynamics 365 Blog.

]]>
2786
Get / Retrieve all Fields of an Entity in MSCRM using C# ( RetrieveEntityRequest ) http://microsoftdynamics.in/2015/09/01/get-retrieve-all-fields-of-an-entity-in-mscrm-using-c-retrieveentityrequest/ Tue, 01 Sep 2015 12:46:00 +0000 http://microsoftdynamics.in/2015/09/01/get-retrieve-all-fields-of-an-entity-in-mscrm-using-c-retrieveentityrequest/ Below Code Retrieve all Fields Of an Entity which can be used to perfore sevral execution Like bulk update of fields in an entity . RetrieveEntityRequest aEntity = new RetrieveEntityRequest();             aEntity.LogicalName = entityLogicanName;           //only get published fields / attributes          ...

The post Get / Retrieve all Fields of an Entity in MSCRM using C# ( RetrieveEntityRequest ) appeared first on Microsoft Dynamics 365 Blog.

]]>
Below Code Retrieve all Fields Of an Entity which can be used to perfore sevral execution Like bulk update of fields in an entity .

RetrieveEntityRequest aEntity = new RetrieveEntityRequest();
            aEntity.LogicalName = entityLogicanName;
          //only get published fields / attributes
            aEntity.RetrieveAsIfPublished = true;
            aEntity.EntityFilters = EntityFilters.All ;
            RetrieveEntityResponse resp = (RetrieveEntityResponse)service.Execute(aEntity);
            EntityMetadata getmetadata = resp.EntityMetadata;
            var crmAttributes = getmetadata.Attributes;
            attributes.Items.Clear();
            foreach (var attr in crmAttributes)
            {
                // filter can be used to get only Custom fields / or System fields with change
                if (attr.IsSecured == false && (attr.CanBeSecuredForUpdate == true || attr.CanBeSecuredForRead == true || attr.CanBeSecuredForCreate == true))
                    attributes.Items.Add(attr.LogicalName);
            }

Hope This Helped You Thanks For the Support , If Any query or suggestion , please comment below

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

The post Get / Retrieve all Fields of an Entity in MSCRM using C# ( RetrieveEntityRequest ) appeared first on Microsoft Dynamics 365 Blog.

]]>
2793
Get Form Type And Save Modes using JavaScript in mscrm 2011 , mscrm 2013 , mscrm 2015 http://microsoftdynamics.in/2015/06/10/get-form-type-and-save-modes-using-javascript-in-mscrm-2011-mscrm-2013-mscrm-2015/ Wed, 10 Jun 2015 13:49:00 +0000 http://microsoftdynamics.in/2015/06/10/get-form-type-and-save-modes-using-javascript-in-mscrm-2011-mscrm-2013-mscrm-2015/ getSaveMode() : Its Return a value telling what was the save event of ms crm entity record ( like is it due to deactivation of form , manual save or save and close etc) below is the full list of events . // CodeexecObj.getEventArgs().getSaveMode(); Event Mode Value Save 1 Save and Close 2 Deactivate 5...

The post Get Form Type And Save Modes using JavaScript in mscrm 2011 , mscrm 2013 , mscrm 2015 appeared first on Microsoft Dynamics 365 Blog.

]]>
getSaveMode() : Its Return a value telling what was the save event of ms crm entity record ( like is it due to deactivation of form , manual save or save and close etc) below is the full list of events .

// Code
execObj.getEventArgs().getSaveMode();

Event Mode Value
Save 1
Save and Close 2
Deactivate 5
Reactivate 6
Send (Email) 7
Disqualify (Lead) 15
Qualify (Lead) 16
Assign (user or team owned entities) 47
Save as Completed (Activities) 58
Save and New 59
AutoSave 70

getFormType() :  Its Return a value Telling about form type of ms crm entity record ( Update , or create etc) , below is the full list of events.


// code
Xrm.Page.ui.getFormType();

Form Type Value
Undefined 0
Create 1
Update 2
Read Only 3
Disabled 4
Quick Create 5
Bulk Edit 6
Read Optimized 11

Its very usefull when you want to restrict or allow any particular event in ms crm using javascript  .


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

The post Get Form Type And Save Modes using JavaScript in mscrm 2011 , mscrm 2013 , mscrm 2015 appeared first on Microsoft Dynamics 365 Blog.

]]>
2796
Set Field Read Only Using JavaScript In MSCRM ( Lock Field in MS CRM ) http://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
GET AND SET VALUES FROM ONE ENTITY TO ANOTHER ENTITY USING PLUGIN IN MSCRM 2011 , 2013 http://microsoftdynamics.in/2014/02/14/get-and-set-values-from-one-entity-to-another-entity-using-plugin-in-mscrm-2011-2013/ Fri, 14 Feb 2014 08:07:00 +0000 http://microsoftdynamics.in/2014/02/14/get-and-set-values-from-one-entity-to-another-entity-using-plugin-in-mscrm-2011-2013/ using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Runtime.Serialization;using Microsoft.Xrm.Sdk;using Microsoft.Xrm.Sdk.Query;namespace elite_employee{    public class Class1 : IPlugin    {        public void Execute(IServiceProvider serviceProvider)        {            IPluginExecutionContext context = (IPluginExecutionContext)             serviceProvider.GetService(typeof(IPluginExecutionContext));            IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));            IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);            new_bankreconciliation reconcil = (new_bankreconciliation)service.Retrieve(new_bankreconciliation.EntityLogicalName, context.PrimaryEntityId, new ColumnSet(true));            if (reconcil.new_BankAccount != null)            {                Guid bank = reconcil.new_BankAccount.Id;                New_bank bk = (New_bank)service.Retrieve(New_bank.EntityLogicalName, bank,...

The post GET AND SET VALUES FROM ONE ENTITY TO ANOTHER ENTITY USING PLUGIN IN MSCRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;

namespace elite_employee
{
    public class Class1 : IPlugin
    {
        public void Execute(IServiceProvider serviceProvider)
        {
            IPluginExecutionContext context = (IPluginExecutionContext)
             serviceProvider.GetService(typeof(IPluginExecutionContext));
            IOrganizationServiceFactory serviceFactory =
(IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

            new_bankreconciliation reconcil = (new_bankreconciliation)service.Retrieve(new_bankreconciliation.EntityLogicalName, context.PrimaryEntityId, new ColumnSet(true));
            if (reconcil.new_BankAccount != null)
            {
                Guid bank = reconcil.new_BankAccount.Id;

                New_bank bk = (New_bank)service.Retrieve(New_bank.EntityLogicalName, bank, new ColumnSet(true));
                reconcil.new_BalanceLastStatement = bk.New_Balance;
                reconcil.new_StatementEndingBalance = bk.new_BalanceLastStatement;
                service.Update(reconcil);
            }
        }
    }
}

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

The post GET AND SET VALUES FROM ONE ENTITY TO ANOTHER ENTITY USING PLUGIN IN MSCRM 2011 , 2013 appeared first on Microsoft Dynamics 365 Blog.

]]>
2850