web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Suggested answer
    Nishant Rana Profile Picture
    11,325 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
    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
    1,532 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
    1,532 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
    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
    1,532 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
    1,532 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
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans