web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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,532

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

I have the same question (0)
  • Tim Dutcher Profile Picture
    2,100 on at

    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.

  • rthompson Profile Picture
    1,532 on at

    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)

  • rthompson Profile Picture
    1,532 on at

    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)

  • Verified answer
    Shidin Haridas Profile Picture
    3,499 on at

    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
    1,532 on at

    Hi Shidin,  would you happen to have an example.

  • rthompson Profile Picture
    1,532 on at

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

  • Verified answer
    SCV Profile Picture
    1,004 on at

    check here:

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

  • Suggested answer
    Nishant Rana Profile Picture
    11,325 Microsoft Employee on at

    You could also evaluate using pickFile method for this scenario

    nishantrana.me/.../

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans