Showing posts with label LogicApps. Show all posts
Showing posts with label LogicApps. Show all posts

December 26, 2022

More about Bicep

Hi Folks, 

Hope you had a great Christmas time and enjoying your holiday time to get ready for the New year. 
Sometime last year Microsoft started promoting Bicep as a new tool (language) for Logic app development, if you haven't read my post on that, pl follow the below link. 

Now its been enough time and Microsoft really come up with a lot of good documentation and real-time example to use bicep to design your solution. Below are some useful links to explore more about bicep, 


-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

April 22, 2021

Lets make Bicep(s) now

Hi Folks,

Let’s work on your Bicep(s) from now onwards. Not the physical musculus but the Logical one, I am talking about the Logic apps here.

The Bicep is a language for declaratively deploying Azure resources and is a domain-specific language (DSL), which means it's designed for a particular scenario or domain. You can use Bicep instead of JSON for developing your Azure Resource Manager templates (ARM templates). It helps to simplify the authoring experience by providing concise syntax, better support for code reuse, and improved type safety. It isn't intended as a general programming language for writing applications.

Here are some useful links for reference, so let’s build the Bicep now.

What is Bicep (Preview)?

Install Bicep





Cheers!!!

-Harry 

Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

September 17, 2020

[Solved] D365FO logic app connector error: Failed with error: 'The browser is closed.'. Please sign in again.


Hi Folks,

I hope all of us keep themself safe during this tough time and utilizing this to learn something new and enhance your skill sets. 

With that note, let me share one of my findings with the Logic Apps issue. I was trying to sign in D365FO connector and getting below error

Failed with error: 'The browser is closed.'. Please sign in again or choose another connection.



Well, there can be many solutions to it, try the below steps, 

1. Check the user is available in the respective D365FO environment with proper access. 
2. Check if there are any API created during one of the tries, and delete it.
3. Clear browser cookies. 
4. Try ti use Edge than other browsers.

Also, if you are working with multiple domains, I mean your azure portal is on a different domain and D365FO is on a different domain try below, 

When you login into https://portal.azure.com/ uncheck below checkbox, and click, 'No'.


Now when you must be able to sign in D365FO connector with other domain without any issue. 

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

May 07, 2020

[Solved] Logic app error while calling D365FO action GetAzureWriteUrl

Error:
{
  "status"400,
  "message""An error has occurred.  Exception occurred while executing action GetAzureWriteUrl on Entity DataManagementDefinitionGroup: The blob with identifier  could not be obtained.\r\nclientRequestId: ###### ###",
  "error": {
    "message""An error has occurred.  Exception occurred while executing action GetAzureWriteUrl on Entity DataManagementDefinitionGroup: The blob with identifier  could not be obtained."
  },
  "source""###.####.dynamics.com",
  "errors": []
}

Possible reason:

If it's coming on newly added action than you are missing guid, If you modify anything on the action the guid parameter clears itself and you need to put it again.


Solution:

Pass a unique value in the action parameter uniqueFileName  , you can write an expression for guid like guid().

Cheers!!!

Check out my other post on Logic app errors and solutions.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

December 30, 2019

[LogicApps/Flow] Odata operators for Odata query

[Updated on September 8, 2020]
Hi Folks,

While working on Logic apps and Flow we need to apply a different filter on Odata query to get the desired data from an Odata entity. Below are the most used operators to use in an Odata query with example. 

The operators supported in the expression language are shown in the following table.

Operator
Description
Example
Logical Operators
Eq
Equal
/Suppliers?$filter=Address/City eq 'Redmond'
Ne
Not equal
/Suppliers?$filter=Address/City ne 'London'
Gt
Greater than
/Products?$filter=Price gt 20
Ge
Greater than or equal
/Products?$filter=Price ge 10
Lt
Less than
/Products?$filter=Price lt 20
Le
Less than or equal
/Products?$filter=Price le 100
And
Logical and
/Products?$filter=Price le 200 and Price gt 3.5
Or
Logical or
/Products?$filter=Price le 3.5 or Price gt 200
Not
Logical negation
/Products?$filter=not endswith(Description,'milk')
Arithmetic Operators
Add
Addition
/Products?$filter=Price add 5 gt 10
Sub
Subtraction
/Products?$filter=Price sub 5 gt 10
Mul
Multiplication
/Products?$filter=Price mul 2 gt 2000
Div
Division
/Products?$filter=Price div 2 gt 4
Mod
Modulo
/Products?$filter=Price mod 2 eq 0
Grouping Operators
( )
Precedence grouping
/Products?$filter=(Price sub 5) gt 10

For details refer below link 


-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

This post is referring to https://www.odata.org/.


December 19, 2019

[Logic Apps] Define parameter null-able.

Hi Folks,

When we define parameters in a Logic apps by default they need a value to be passed by calling object. If you want to make a parameter to accept null value as well then define them as below.

default declaration:

{
    "properties": {
        "packageName": {
            "type": "string"
        }
"type": "object"
}
}

Allow null value:

{
    "properties": {
        "packageName": {
           "type":["string", "null"]
        }
"type": "object"
}
}

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

September 23, 2019

[Solved] The server did not received a response from an upstream server

Hi Folks,

Here we come to our second post on Logic app troubleshooting. Check this link (if you haven't yet) for the previous post.

Error: 

  "error": {
    "code": "NoResponse",
    "message": "The server did not received a response from an upstream server. Request tracking id '#########'."


Possible reason: 

Well, there is not an issue in your logic app, it's running fine. There must be some issue with data.

Solution: 

As its a data related issue and to see more details on the error, navigate to data management in FO and see the execution history of this export/Import. You must get detail of error and once you fix them you must be able to run successful next time. Also, I would recommend adding an extra action on your logic app to handle this error.

Another thing you can try to do import same file manually and if you found the issue, fix that and try again with Logic app.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

PS: Logic apps can be used for multiple purposes. In most of my post, I'll be dealing with in #MSD365FO  related issues.

August 18, 2019

How to increase font size in BizTalk schema/Map editor

Hi Folk,

Now when Logic apps are all over around the integration of D365FO, I am sure you have seen BizTalk editor once in a while. The default editor's font size is so small, you may need a magnifier glass. And I really mean it.

I searched for some solution around the web but didn't found much of the help. Well, here I am sharing my finding with the possible solution or I would say most suitable solution as of now.

Here is a screenshot of the default font size.



To fix this issue, Go to

Setting > Display setting > Advance Display setting > Advance Sizing of text and other Items

Above navigate should give you below screen





















here click on 'set a custom scaling level'. and set the scale to 300%

























Once you have done this, re-login into the system and see the changes. Below is the new appearance of the same map.









































For more details on BizTalk check below link,

https://docs.microsoft.com/en-us/biztalk/core/using-biztalk-editor

Cheers!!!
-Harry
 Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

August 04, 2019

[Solved] Error in Logic app. Status: 403

Hi Folks,

Logic comes a long way for most of the integration thing in Dynamics 365 FO. Its provides a good set of connectors to develop inbound/outbound integration process. While troubleshooting any error is not so easy while it comes to the logic app for new people. I will be sharing some the common error which I faced during development and hopefully, that will helpful for you guys too.

Error: 
"status": 403,
  "message": "{\r\n  \"Message\": \"An error has occurred.\",\r\n  \"ExceptionMessage\": \"Forbidden\",\r\n  \"ExceptionType\": \"System.ServiceModel.Web.WebFaultException`1[[System.ComponentModel.Win32Exception, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=######]]\",\r\n  \"StackTrace\": \"   at Microsoft.Dynamics.Ax.Services.ServicesSessionProvider.ThrowSessionCreationException(ServicesSessionCreationErrorCode exceptionCode)\\r\\n   at Microsoft.Dynamics.Ax.Services.ServicesSessionProvider.GetSession(Boolean isILSession, Boolean bypassAuthentication, String issuer, String company, String language, String partitionKey, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Ax.Services.ServicesSessionManager.InitThreadSession(Boolean ilSession, SessionType sessionType, Boolean bypassAuthentication, String authIssuer, String company, String language, String partitionKey, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.ServicesAosSessionManager.InitializeSession(Boolean bypassAuthentication, String authIssuerThumbprint, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.OwinRequestSessionProvider.CreateSession(ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.ServicesRequestSessionHelper.EnsureRequestSession(IServicesRequestSessionProvider servicesRequestSessionProvider, ClaimsIdentity claimsIdentity)\\r\\n   at Microsoft.Dynamics.Platform.Integration.Common.SessionManagement.EnsureServicesRequestSessionHandler.EnsureServicesRequestSession(HttpRequestMessage request, IApplicationEnvironment applicationEnvironment)\"\r\n}\r\nclientRequestId: ##########",
  "source": "########Dynamics.cloudax.dynamics.com",

  "errors": []

Possible reason: 
You have used certain users in Logic apps while creating API connections. while that users don't have access to target AX system.

Solution: 
Check the used in target/Source AX system if the user doesn't exist import the same with admin or proper access. If the user exists then check its access.

I will keep posting any error which I faced with a solution that works for me and I hope that may work for you as well. If you are getting other error, put that in the comment section and I will try to find a solution for you.

Cheers!!!
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

May 13, 2019

How to add 'Actions' on Odata entities


Hi Folks,


[Updated on Jan 27, 2020
I got one feedback about Odata action on entity extension are not supported. It worked for me for one odd case, I yet to test myself if its not working now. I would request all readers to take necessary caution while trying below code. Thanks to Ashish for sharing his feedback.]


In this post, I'll show how to add a new action to D365FO Odata entities which you may want to access in Logic apps or Microsoft Flow. There could be two possible scenarios, either you have custom data entity where you can directly add a method or you have standard data entity for that you need to create extension class.  

First, let's see how to add on the custom entity (yes cause, it's straight forward 😉 ), 

Add your method on data entity and add below attribute
 [SysODataActionAttribute("<MethodName>", false)]
public static void <methodName>(<parameters(optional)>)
{
}

Save, Synch and Build your changes. This method should be available now on OData action in the Logic app or Flow. 

Now the other part, how to add the same in Data entity extension. Create a new class and add below attribute.

[ExtensionOf(tableStr(<data entity name>))]
final class <data entity name>_Extension
{
         [SysODataActionAttribute("<MethodName>", false)]
         public static void <methodName>(<parameters(optional)>)
        {
         }
}

Pl make sure you use '_Extension' keyword for above class, it's mandatory.

That's all for today. Try it and share your feedback. 

[Updated May 18, 2020]

 If you want to return any value use this syntax

 [SysODataActionAttribute("<MethodName>", false), SysODataCollectionAttribute("return", Types::Record, "CarColor")]

         public static void <methodName>(<parameters(optional)>)

        {

         }


Check below link for more details on Odata


Related topics:

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta