Skip to main content

Notifications

Dynamics 365 Community / Blogs / Learn with Subs / Switch legal entities in D3...

Switch legal entities in D365F&O, using Copilot (low code, no code)

Subhad365 Profile Picture Subhad365 7 User Group Leader
 


Amigos, use this cool hack to or switch between legal entities, using Copilot sidecar chats.
For example, when we ask the Copilot: to change the legal entity, here is the response that we get:


Unimpressive, eh? It's replying by saying the steps to change between legal entities, embdedding the links from Microsoft learn. 
Now, let us bring some life into it.
Log on to: https://copilotstudio.microsoft.com/ and choose the correct environment from the dropdown:


Choose from Agents >> Copilot for Fiance and Operations apps:


This is where you can define topics, actions, knowledge, Activities and a lot of other staffs that can contain the overall behavior of Copilot chat. 
Click on Topics >> Add a topic >> Choose Topic from the Blank:


  This is where you would land:


Start by giving a proper name to your chat topc:


In the Phrases >> Edit >> add prompts like this:


In the + symbol from below, select Add a question :


Frame your question like this:


From the Identify option, choose the following: Organization as an answer:

Which means when the user responds to the question, the system should identify it as an Organization.
Change the name of the variable as company:



Which enforces the variable to be used as a Global variable, instead to be scoped only to this step.
In the next step, declare a variable like this:




Create the variable as:



And give the name like this:


In the To value, give the value like this:



Which is the base Url of your F&O instance (please note: keep it like this: https://org0d99e1f5.operations.dynamics.com/?cmp= and not the compplete URL). To this, the variable baseUrl, automatically identifies itself as of type String.
Set another variable shown as above:


And name it as: completeUrl. Then click on the Set value >> click on Formula:


Give the formula like this: 


Which is essentially concatenating the selected variable at the end of the bas URL.
Click on Insert to continue.
Lasly click on + sign and add: Send message:


Here you go and click on fx button to formulate the messgae:


You need formulate the result much like this:



That is going to convert the answer as a Link, with the company name on it. Click on insert, Save your topic and Publish it, by click on the 'Publish' link from the top.
Let us come back to our D365F&O and reload the Copilot chat, and ask the same question. Let us see what the result comes this time:







The legal entity comes as a hyperlink, clicking which would take you to the desired legal entity.
Cool, nah? Let me take your leave for today. Would come back soon with more such cool hacks from Copilot. Till then, take care, much love and Namaste as always 💓💓💓




Comments

*This post is locked for comments