Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Create a button that a user can click to trigger a plugin to load a CSV file

(0) ShareShare
ReportReport
Posted on by 1,530

Hi,

I have a CSV file that I would like to load based on a user clicking a button.  This file has to be controlled from a end user loading the file.  I know I can use import but I want to make this simple for the end user.

I am not updating 1 entity.  I am updating a collection of entities.

Here's what I have.  I have created c# code (plugin) to retrieve the csv file and update the table that needs to be updated.

My question is can I create an action that will prompt the user to load the csv file based on a yes/no prompt.  Once the user has selected "yes" the action will trigger the plugin.

If I can do this.  What all do I need to do.

Thanks

*This post is locked for comments

  • Suggested answer
    Nishant Rana Profile Picture
    Nishant Rana 11,320 Microsoft Employee on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    You could also evaluate using pickFile method for this scenario

    nishantrana.me/.../

  • Verified answer
    SCV Profile Picture
    SCV 1,004 on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    check here:

    sacconsulting.blogspot.com/.../how-to-call-global-action-from.html

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    I need to be able to call the action without it based on 1 entity.

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    Hi Shidin,  would you happen to have an example.

  • Verified answer
    Shidin Haridas Profile Picture
    Shidin Haridas 3,497 on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    If you want to call a custom platform level logic from your client, then use javascript to call an action.

    You can extend actions to cover the scenarios you have mentioned.

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    Hi Tim,

    I am not using version 9 yet.

    I am using Microsoft Dynamics CRM 2016 (8.1.0.359) (DB 8.1.0.359)

  • rthompson Profile Picture
    rthompson 1,530 on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    Hi Tim,

    I am not user version 9 yet.

    I am using Microsoft Dynamics CRM 2016 (8.1.0.359) (DB 8.1.0.359)

  • Tim Dutcher Profile Picture
    Tim Dutcher 2,100 on at
    RE: Create a button that a user can click to trigger a plugin to load a CSV file

    Are you using version 9? If so, you can use the pickFile function client-side, parse the csv then create/update records. https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-device/pickfile

    Are pre-built library such as Papa Parse might help as well... https://www.papaparse.com/

    If you want to do things mostly server-side, then I would use a function like pickFile to prompt the user for the file. Then pass the file contents to a custom action. Create a plug-in to handle the action event and to get and process the file contents in the plug-in.

    Note that plug-ins have a 2 minute time limit so I would prevent users from uploading files that might cause the plug-in to time out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans