Using Script Component to specify input value to OLE DB Source Component in SSIS


Recently we had a requirement to write an SSIS package that will fetch the data from SQL Server and will insert it (or create records) into Dynamics 365 CE.

For connecting and fetching data from SQL Server, we were using OLE DB Source Component with data access mode as SQL Command which had one parameter, whose value we had to fetch from Dynamics 365 CE.

For passing the value to this parameter we had defined a variable within our Package named LastUpdateFromCRM.

Now as we wanted to set the variable value from one of the records in Dynamics 365 CE, we used KingswaySoft’s CDS/CRM Source Component Editor, that will return us one row using fetch xml + max rows returned property.

Then we added a script component to the output of the CDS/CRM Source Component.

Here double-clicking the Script Component and selecting Input Columns inside the editor, we can select the input columns that we want to use within the Script Editor.

Next, we selected Script section inside the editor, there we selected the user variable as Read Write variable (as we are setting its value inside our script) and clicked on Edit Script button to open the VSTA Project.

Within VSTA project, inside main.cs we defined a date time variable to hold value coming from the CRM Source Component i.e. the value of last update field.

Inside ProcessInputRow method, we then set the value of that variable and finally within Post Execute method we use it to set the value of our user-defined variable.

Now as we have specified the value to our LastUpdateFromCRM variable, its value was passed to the SQL Command of OLE DB Source component as intended.

Hope it helps..

D365 V9{Upgrade}: Ribbon Button Enable Rule Custom JS Code gives error “Cannot read property ‘getFormContext’ of undefined”


Ajit Patra's avatarAjit Patra

While working on upgrade activities of D365 V9 from D365 V8, we faced one weird issue related to Enable Rule of  Ribbon button.

We had one form where we were using Enable Rule for a button which was defined using custom JS code. As part of client side scripting changes related to D365 V9 upgrade, we passed Primary Control as first CRM parameter in Ribbon Workbench for that Enable Rule as explained here and in JS we passed executionContext as a parameter as shown below:

While testing after making the above changes, we got the error “Cannot read property ‘getFormContext’ of undefined”

aaaa

While debugging the code using Developer Tools in browser, we found that executionContext is undefined

cccccc

Then, continuing execution, we found that the method/debugger was hit again and this time we got the value in executionContext

bbbbb

This was a strange behavior that custom JS code for Enable Rule…

View original post 45 more words

Using Output Timezone property of CDS/CRM Source Component in SSIS


In Dynamics 365 CE, the data time field’s value will always be returned in UTC time when retrieved through the Organization Service.

Just go through this insightful article to learn more about CRM Date Time.

https://www.powerobjects.com/2012/06/07/crm-2011-truths-about-datetime/

For e.g.

Within application à

Inside CRM

Now to get it in Local Time of the User we can use LocalTimeFromUTCTimeRequest class.

https://www.inogic.com/blog/2013/06/how-to-convert-the-datetime-in-local-and-utc-date-time-format/

Now the good thing is if we are using CDS/CRM Source Component of KingswaySoft’s SSIS Integration Toolkit, it has the Output Timezone property.

It has following 3 values.

Here UTC (Default) will return the value in UTC and Adjust to the time zone of connection user or the impersonation user will return values based on the user’s time zone. This property makes it extremely intuitive and easy to work with DateTime field within Dynamics 365 CE.

Hope it helps..

Fixed – Unable to Login to Dynamics CRMOrganizationWebProxyClient is nullOrganizationWebProxyClient is null error while using CrmServiceClient


Recently for a console application we got the below error while using CrmServiceClient.

The possible reason is we haven’t specified that security protocol TLS12 to be used in our console application and it is still targeting .NET Framework 4.5.2.

Add the following line of code to get it working if that is the case.

If we are using Visual Studio 2017, simply change the Target Version to .NET Framework 4.6 or higher. It internally defaults to Tls12, so we do not need to specify it explicitly.

https://support.microsoft.com/en-ae/help/4051700

Hope it helps..

Blockchain as a Service (BaaS- Azure) Introduction


Aishwarya C Ramachandran's avatarUpskill your Tech Skills

Just to save you some time – read the article if you would like answers to the below questions 😊

  • What is Blockchain?
  • What is Blockchain a solution to?
  • Different types of Blockchain
  • Why is Blockchain secure?
  • How does blocks get built in a ‘Block-chain’?

Happy reading!

What is Blockchain

In physical terms – Blockchain is essentially a network of computers. Each computer in the network accepts, confirms and stores transactions in a synchronized chain of confirmed transaction blocks. Each block applies cryptographic proofs and hashes – thus making the blocks / transactions in the blockchain / network immutable.

Pic1

What is Blockchain a solution to?

 Blockchain allows for all parties involved to agree on the current state of something of value without any possibilities for dispute.

Blockchain caters to the above need perfectly because: –

  1. It is immutable – Transactions; remain on the blockchain; it is not…

View original post 745 more words

Microsoft Common Data Service : CDS


Nice introduction to CDS !

Aishwarya C Ramachandran's avatarUpskill your Tech Skills

Before you go ahead, read this article if you would like the below questions answered: –

  1. What business problem does the CDS solve?
  2. How does the common Data Service(CDS) work?
  3. How can I get access to it?

Business Pain points

CDS brings together all data from different departments/ databases into 1 repository

CDS provides accurate end-to-end views of data from across systems

Today, even mature companies face issues of ‘disconnected data’. HR holds different attributes about the same set of data as Finance does. How would it look if in one place we can find information about an employee from every aspect (HR, Finance, Sales Performance etc.)

Pic1

How does CDS work?

At the core of the common data service is the Common Data Model.

The common data model comes prepopulated with many business entities that are useful across a variety of business and application domains. These entities can be…

View original post 435 more words