Monday 2 July 2018

Microsoft Flow: Sql Server Table Names is not Visible in Flow




Recently came across a limitation/issue while creating a flow to export some data from Azure SQL Server. Flow does not show table in the list if it does not have a Primary Key, so we made a DateTime field Primary Key (bad practice anyway). But it was not showing in list of list of tables.

Then came across SQL Connector Documentation and found it's limitations there. Second point under limitations says that table must have an IDENTITY column.

Limitations

The triggers do have the following limitations:
  • It does not work for on-premises SQL Server
  • Table must have an IDENTITY column for the new row trigger
  • Table must have a ROWVERSION (a.k.a. TIMESTAMP) column for the modified row trigger


Then we changed our SQL table as below and it started showing up in the list of tables in flow:

CREATE TABLE [dbo].[abc_TriggerToRunExportUsingFlow](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[TriggerOn] [datetime] NOT NULL,
[Description] [nchar](50) NULL,
PRIMARY KEY CLUSTERED 
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[abc_TriggerToRunExportUsingFlow] ADD  CONSTRAINT [DF_abc_TriggerToRunExportUsingFlow_TriggerOn]  DEFAULT (getdate()) FOR [TriggerOn]
GO
Premjit Singh
Attendite Ltd.
Twitter

Monday 25 June 2018

Resolve Error "Unable to Login to Dynamics CRM" after v9 update




Recently we have updated our Dynamics 365 to v9 and we are updating our applications to the latest version of SDK.

As per Microsoft Guideline, approach is to update apps to .NET Framework 4.6.2 and update CRM SDK to latest v9.0 assemblies. But application was still throwing same error message ("Unable to Login to Dynamics CRM").

One of my colleague pointed to a David Branscome's Post about moving away from TLS 1.0 and 1.1 to 1.2 and it reminded me about the post I read few days back.

Because our .NET assemblies were already updated so version 4.6.2 and it should be handling the TLS Protocol issue itself. But our application was still throwing the same error so we decided to try invoke TLS1.2 manually in our application before CrmServiceClient is instantiated. Following line was added to the code:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

But it was still throwing same error and then we started looking at assembly references and app.config. In config we found that targetFramework was pointing to 4.5.2 and it worked when we changed to 4.6.2 (as shown below). Once it is updated connection will was created without any issue.


<httpRuntime targetFramework="4.6.2" />



Premjit Singh
Attendite Ltd.
Twitter