CRM2016
I have the requirement to generate a text file containing records from selected records in a view. If only one record is selected, then its a standard workflow scenario, however there may be more than one record selected. As there would be several of these files created on a daily basis, I would need to be able to set the name of the file via a dialog box.
In my head, I see it that I would select the required records from a view then run a dialog to set the output file name. Then create a list of the selected records and in code grab the info required then insert to the text file.
I suppose if I run a dialog box, create the blank file, then fire a workflow to add to that file.
Any suggestions on how to go about this please
*This post is locked for comments
I would take a look at the following:
Creating a Ribbon button using Ribbon Workbench
Process.js (api to call workflows or actions)
Introduction to webapi and webapi samples
msdn.microsoft.com/.../gg334279.aspx
msdn.microsoft.com/.../mt742425.aspx
Comparison of different api libraries
community.dynamics.com/.../webapi-library-comparison-in-dynamics-365
do you know of any examples or tutorials I can look at
You can also create a ribbon button, which will get all the selected records and call a JavaScript function, where you would ask for the file name, and the js process can call a workflow, action or use webapi to generate the file for you.
You can use process.js to call workflow or action if needed.
Remember that dialogs are being deprecated, so I would stay away from them, so that you do not have to redo your logic in a future release.
Hope this helps.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156