Menu Close

Blog

Slide 1

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 2

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 3

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

previous arrow
next arrow

CREATE SANDBOX USING PRODUCTION COPY IN DYNAMICS 365 ONLINE

Here we can create two type of copies from production
1) Production to sandbox(full copy)
2) Production to sandbox(partial copy)

If you choose to make a full copy of the production instance then you need to look into the storage anywhere near the limit from the Dynamics 365 Admin Center..

FULL COPY OF PRODUCTION TO SANDBOX:

The advantage of full copy production to sandbox is that of replica of the production and everything is copied into sandbox (name it as UAT).

Copied functionality is everthing starting from entities, webresources, plugin, workflows, business process flow,  etc..

Here is an important point to discuss is that if you have development work to be done then it is good to  have a partial copy of the production as a sandbox(development environment).

PARTIAL COPY OF PRODUCTION TO SANDBOX:

The advantage of the copying of the partial copy is that its just copy the skeletion of the production instance no records are moved into the sandbox, just  like the brand new CRM but the all the customization of the production without the records and just the views, workflows, webresources etc…

So if you have a project to deliver then start from the partial copy of the sandbox and name it as development environment and create an another copy of the production to sandbox name it as UAT.

After successfull development work in the dev(sandbox) then deploy the  solution into the UAT, then test the functionality and deploy into the production..

I hope this helps::

Happy CRMing.

  

Share this:

BULK UPDATE OF THE PRIMARY CONTACT’S COMPANY NAMES IN ALL CONTACTS IN DYNAMICS 365

If you want to bulk update the primary contacts “company name” field value in all the contacts records.

Then the below code is helpful:

public void Execute(IServiceProvider serviceProvider)
        {
            // Obtain the execution context from the service provider.
            IPluginExecutionContext context =
                (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

            // Get a reference to the Organization service.
            IOrganizationServiceFactory factory =
                (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            IOrganizationService service = factory.CreateOrganizationService(context.UserId);
            Entity entity;
            if (context.InputParameters != null)
            {
                entity = (Entity)context.InputParameters[“Target”];

                string fetchXML = @”<fetch version=’1.0′ output-format=’xml-platform’ mapping=’logical’ distinct=’false’>
              <entity name=’account’>
                <attribute name=’name’ />
                <attribute name=’primarycontactid’ />
                <attribute name=’telephone1′ />
                <attribute name=’accountnumber’ />
                <attribute name=’accountid’ />
                <order attribute=’name’ descending=’false’ />
                <filter type=’and’>
                  <condition attribute=’primarycontactid’ operator=’not-null’ />
                </filter>
                <link-entity name=’contact’ from=’contactid’ to=’primarycontactid’ alias=’PrimaryContact’>
                  <attribute name=’parentcustomerid’  />

                    <attribute name=’contactid’ alias=’contact’/>
                  <filter type=’and’>
                    <condition attribute=’parentcustomerid’ operator=’null’ />
                  </filter>
                </link-entity>
              </entity>
            </fetch>”;
           
                EntityCollection entityCollection = service.RetrieveMultiple(new FetchExpression(fetchXML));
                for (int i = 0; i < entityCollection.Entities.Count; i++)
                {
                 
                        Entity contact = new Entity(“contact”);
                        contact.Attributes[“parentcustomerid”] = new EntityReference(entityCollection.Entities[i].LogicalName, entityCollection.Entities[i].Id);
                        contact.Attributes[“contactid”] = entityCollection.Entities[i].GetAttributeValue<AliasedValue>(“PrimaryContact.contactid”).Value;
                        service.Update(contact);
                 
                   
                }
            }
            else
            {
                return;
            }
        }
========================================================================

Message : Update
Entity: Account
Attribute: email
Post-operation, Asynchronous,

I hope this helps:
Happy CRM ing:-)

Share this:

IMPORT ADDITIONAL RECORDS INTO DYNAMICS 365

There is a requirement to import the additional contacts into dynamics 365

So i have opted to use the OOB functionality, i.e Template from dynamics 365.

Goto Settings > Data Management > Template for data import and select the entity you want to download as a template.

Please find the below diagram:

Then download the template and add the records you want to import into dynamics 365.

Import was partially successful with 977 records failure because of the lookup reference could not be resolved.

In my case the additional contacts have companyname  but inside dynamics 365, there is no accounts with those name, so the lookup could not be solved.

So i have created the new accounts in the dynamics 365 and reimported the failed contacts and the import was sucessful.

Share this: