When you are using connectors such a CRM(CDS) or ERP connectors in the action you still have hardcoded values to the environment name.
And I know this is can be a tricky one.
"Lists_items_present_in_table": { "runAfter": {}, "type": "ApiConnection", "inputs": { "host": { "connection": { "name": "@parameters('$connections')['dynamicsax']['connectionId']" } }, "method": "get", "path": "/datasets/@{encodeURIComponent(encodeURIComponent('xxxxx.cloudax.dynamics.com'))}/tables/@{encodeURIComponent(encodeURIComponent('CustomerGroups'))}/items" }
I could see two resolutions to this, one is to resolve this "xxxxx.cloudax.dynamics.com" to an ARM template parameter. Or resolve this to a logic app parameter.
The upside of the ARM template parameter is that when you look at it in the designer experience everything works. If you change this to a logic app parameter it won't work at design time, but will work at runtime.
ARM parameter
"path": "[concat('/datasets/@{encodeURIComponent(encodeURIComponent(''',parameters('Organization') ,'''))}/tables/@{encodeURIComponent(encodeURIComponent(''CustomerGroups''))}/items')]"
When you are using connectors such a CRM(CDS) or ERP connectors in the action you still have hardcoded values to the environment name.
And I know this is can be a tricky one.
"Lists_items_present_in_table": { "runAfter": {}, "type": "ApiConnection", "inputs": { "host": { "connection": { "name": "@parameters('$connections')['dynamicsax']['connectionId']" } }, "method": "get", "path": "/datasets/@{encodeURIComponent(encodeURIComponent('xxxxx.cloudax.dynamics.com'))}/tables/@{encodeURIComponent(encodeURIComponent('CustomerGroups'))}/items" }
I could see two resolutions to this, one is to resolve this "xxxxx.cloudax.dynamics.com" to an ARM template parameter. Or resolve this to a logic app parameter.The upside of the ARM template parameter is that when you look at it in the designer experience everything works. If you change this to a logic app parameter it won't work at design time, but will work at runtime.
Logic App parameter "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('Organization')))}/tables/@{encodeURIComponent(encodeURIComponent('CustomerGroups'))}/items",
ARM parameter "path": "[concat('/datasets/@{encodeURIComponent(encodeURIComponent(''',parameters('Organization') ,'''))}/tables/@{encodeURIComponent(encodeURIComponent(''CustomerGroups''))}/items')]"