Transaction aware batch process using ‘ExecuteMultipleRequest’

Rajeev Pentyala - Dynamics 365 Blog

In this article, I am going to discuss about transaction aware batch processing in ExecuteMultipleRequest using  ExecuteTransactionRequest.

Is ‘ExecuteMultipleRequest’ not a transaction aware?

  • By design, ‘ExecuteMultipleRequest’ is non-transactional.
  • Which means ‘Request’ objects added to ‘ExecuteMultipleRequest’ are independent of each other and if any exception occurred in any of the ‘Request’ will not roll back previously committed ‘Requests’.
  • However you have an option to stop the batch (i.e., By setting ContinueOnError = false),  if any exception occurs.
  • Important to note is that, this behavior is not a transaction aware and ‘Requests’ executed prior to the error, will still be committed.

How can we achieve ‘Transaction’ in Batch execution?

  • Using ExecuteTransactionRequest, we can achieve ‘Transaction’ (i.e., Commit and Rollback) in Batch execution
  • ExecuteTransactionRequest will execute the all the ‘Requests’ in a single transaction.
  • If any exception occurred in any of the ‘Request’ execution, will roll back all the previously…

View original post 301 more words

Advertisements

MultiSelect Option Set in Dynamics 365

Nishant Rana's Weblog

With July 2017 update, we can now finally create multi-select option set in Dynamics 365.

We can also use Existing Global Option Set while defining our Multi Select Option set.

This is how control looks within the form.

Within Advanced Find View

We can use the existing option set client-side methods on Multi Select Option Set.

https://msdn.microsoft.com/en-us/library/gg334409.aspx#Anchor_1

getSelectedOption() – for new_weekday multiselect option-set with value Thursday and Friday selected –

Hope it helps..

View original post

Dynamics 365 v9 – NOT IN support for Advanced Find

Dynamics 365 Funda by Zohaib Uddin Khan

Let’s discuss all the new features of Dynamics 365 v9 updates. One of the interesting ones is ‘NOT IN Support for Advanced Find’.

Purpose of this new feature is to find all those Cases that do not contain a Task using Advanced Find.  Let’s kick in to play with it.

Go to Dynamics 365 – click on Advanced Find

Scenario # 1:

  • Look for: Cases
  • in the below pane, do ‘Tasks (regarding) = Contains Data”
  • Click on Results button.

This query will return all the Cases which have at least one Task associated with it.

D365-v9-NOT-IN-Advanced-Find-1

If you click on the ‘Download Fetch XML’, you will find the below info:

D365-v9-NOT-IN-Advanced-Find-3

Scenario # 2:

  • Look for: Cases
  • in the below pane, do ‘Tasks (regarding) = Does Not Contain Data”
  • Click on Results button.

This query will return all the Cases which don’t have any Task associated with it.

D365-v9-NOT-IN-Advanced-Find-2

If you click on the ‘Download Fetch XML’, you…

View original post 23 more words

Dynamics 365 Attribute Name lengths

@ramontebar

This article captures the maximum attribute name lengths allowed in Dynamics 365 (CRM). This is a simple thing but I carry on forgetting it and it is useful to have them always in mind.

  • Attribute Display Name max length = 50 characters
  • Attribute Unique Name max length = 41 characters
  • Attribute Description max length = 200 characters
  • Attribute Form Label max length = 100 characters

See below the corresponding screenshots locating those elements:

ramontebar_blog_new attribute name lengthsramontebar_blog_Field Attribute Label

View original post

Resolving Duplicate Lookup References in Import Process

Exploring Dynamics CRM

Normally when we import records which has a related entity, import process will resolve the lookup reference if it finds single record in the parent entity otherwise, it will stop processing the record and ends in fail.

Ex: When we are importing a Contact (Contact1) with Parent Account (Account1) and system has two accounts with same name then Import process gives error when processing Contact1

To resolve these types of records we need to make a small tweak before submitting the import job. Here we go

Click on Edit in the mapping dialog

Go to Parent Account field in the list of mappings and click on Lookup

Set the unique field as the reference

Now in the import file add the data as Account Number for Parent Account field.

Hope this helps 🙂

View original post

Add New (+) button behavior of sub grid in D365

While working with a sub-grid in D365, a question was thrown regarding behavior of Add record (plus) button. Many of you must have observed that for few sub-grids, click action of Add record button opens a new form to create a new record while for others a new line is added in sub-grid where one can add the record name and associate it. You might have figured the reason for this earlier but it was now that a college helped to figure out why it happens for me.

For those who were still looking for the reason of this behavior like me, this is all related to requirement level of the look-up field on child record. If Look-up is configured as business required then a new form is opened else the grid provides an inline row to associate the record. My assumption for this behavior is that if the look-up is business required, then it is assumed that all the existing records are already associated with some parent record thus user should create a new record. Always correct me if i’m wrong 🙂

Installing the latest version of Voice of the Customer (v 9.0.x.x)

@ramontebar

Last week I was running a new Dynamics 365 trial (v 8.2.1.289) and I wanted to use the Voice of the Customer module.

Based on the previous versions of this solution (v.8.x.x.x), I followed the same steps that I used to: Office 365 => Dynamics 365 Admin Portal => INSTANCES => Solutions, see below screenshot:


However, when I tried to install it from this Solutions section, the installation process just failed once and again.

After a quick call with Microsoft Support, they told me the new installation process at the APPLICATIONS tab, see below screenshot:

Once you are there, just click on MANAGE and follow the next few steps choosing your corresponding instance (whose version needs to be >=8.2). Then you can track again the installation process in the Solutions section:

Hope this saves you some time 😉

View original post

[Workaround] CRM Workflow: Send Email Action – “From” field greyed out

Credit for the workaround goes to Chris Doran for sharing the solution on Dynamics Forum https://community.dynamics.com/crm/f/117/t/206486 

In some cases if the “From” field for “Send Email” step is disabled (mostly after 2016 update 1) which restricts sending emails from workflow, follow below steps.

 

It is a known issue with below workaround from MS Support.

  1. Create a new solution and add in the ‘from’ field from the email entity – just that nothing else from the email entity.
  2. Export the solution as an unmanaged solution.
  3. Edit customizations.xml and look for the line that says for “From” field. The tag is available for other lookups too (like created by) which should not be touched.            <LookupTypes />
    Replace that line with:
    <LookupTypes>
    <LookupType id=”00000000-0000-0000-0000-000000000000″>8</LookupType>
    <LookupType id=”00000000-0000-0000-0000-000000000000″>2020</LookupType>
    </LookupTypes>
  1. The attribute will look like this:
    <attribute PhysicalName=”from”>
    <Type>partylist</Type>
    <Name>from</Name>
    <LogicalName>from</LogicalName>
    <RequiredLevel>none</RequiredLevel>
    <DisplayMask>ValidForForm|ValidForGrid|RequiredForForm</DisplayMask>
    <ImeMode>auto</ImeMode>
    <ValidForUpdateApi>1</ValidForUpdateApi>
    <ValidForReadApi>1</ValidForReadApi>
    <ValidForCreateApi>1</ValidForCreateApi>
    <IsCustomField>0</IsCustomField>
    <IsAuditEnabled>1</IsAuditEnabled>
    <IsLogical>1</IsLogical>
    <IsSecured>0</IsSecured>
    <IntroducedVersion>5.0.0.0</IntroducedVersion>
    <SourceType>0</SourceType>
    <IsGlobalFilterEnabled>0</IsGlobalFilterEnabled>
    <IsSortableEnabled>0</IsSortableEnabled>
    <LookupStyle>single</LookupStyle>
    <LookupTypes>
    <LookupType id=”00000000-0000-0000-0000-000000000000″>8</LookupType>
    <LookupType id=”00000000-0000-0000-0000-000000000000″>2020</LookupType>
    </LookupTypes>
    <displaynames>
    <displayname description=”From” languagecode=”1033″ />
    </displaynames>
    <Descriptions>
    <Description description=”Enter the sender of the email.” languagecode=”1033″ />
    </Descriptions>
    </attribute>
  2. Put the new customizations.xml back in the solution zip file replacing the existing one.
  3. Import the solution back and publish.