Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
Is there anyway autocomplete functionality can be implemented from an external API call in dynamic, Like when typing, a prediction of result from the remote server showed drop down in dynamic and then the user can pick one ?. Someone with better knowledge showed please help.
What version you are on.
If you're on version 9 you can try creating a custom control using PCF framwwork.
If you are not on latest version then try following sample.
However with this approach you can fetch all data from external api using a custom action driven by a workflow.
And then filter based on entered text.
@ketan I am using V9, the first link in your reply is empty. With the gallery I think I should be able to use that. Where can I find the latest doc on pcf?
You can find official documentation on below link.
@ketan, i saw this in one of the countrols Gallery - "A control to select a value from a predefined list of values and automatically filters the values based on what the user types.". Does it mean that external calls using an API cant be made ? I am completely new to PCF, never written a code to develop PCF before.
It is not the case, you can have dynamic values for your custom control.
You can refer same pcf control from pcf galary and retrieve data dynamically instead of pre defined.
Refer code :github.com/.../Autocomplete
In that cods in file index.ts
Replace following line.
var optionsPropValue = context.parameters.options.raw;
Here you can call your api and get data and set response Jason as optionsPropValue.
And in menifest.xml you can comment out following line.
<property name="options" display-name-key="optionsValue" description-key="List of options separated by comma" of-type-group="optiondatatypes" usage="input" required="true" />
If this helps, please mark verified.
Ketan A quick question, how do i reference a field that i need to pass in the API inside the index typescript file ?. And the index file isnt in the AutocompleteControl solution file that willl be inported into dynamics, would a ny change in the index file affect the solution, since the index file is outside the solution.
Whichever fields you want to refer for a control you can declare that in a Menifest.xml as bound parameter.
You could declare unbound parameters as well like flags, api url etc as input parameter.
Changes in index.ts won't affect packaged solution which is ready for import.
@ketan thanks for responding swiftly. since the index.ts is outside the solution file, it means any of my modifications wouldnt change anything in the solution right ?. sorry about all these questions, this is a diff level of coding for me.
Yes, to add new changes to solution you would need to build and package solution again.
You can test your custom control before packing using following command.
1) npm run build
2) npm start
Thank @ketan. At this point, i will go with your second option - "However with this approach you can fetch all data from external api using a custom action driven by a workflow.", , as i have no exeperience in creating my own managed solution. Would be in my to-do list though, to create my own solution. I can fetch all the data from the external api and then save them in an entity, use OOB autocomplete to lookup the entity. Any example (link) of how/where this action is executed ?
Following link will help you get data from external api
@ketan thanks buddy!. which i could implement the PCF solution, but time constraint, i need to deliver this for a client in a day, and the custom approach above wouldnt work n my case, as it doesnt download all the data as expected. I ahve marked the your approach as answer.
Business Applications communities