locked
C# to open created record RRS feed

  • Question

  • Hello everyone, I see lots of examples of javascript to open a CRM record but I am not coming across any examples of how to open a CRM record using C# in a plugin.

    I have a plugin that takes leads from our website and creates a new lead in the CRM. I also want it to open that Lead once created. Is there a way with C# to open a record from within the plugin?

    Thanks!

    Tuesday, November 19, 2013 10:33 PM

All replies

  • A plugin is used to extend CRM platform's functionality using the events fired by the platform and has little to do with the UI.

    What is triggering your plugin (initiating the lead creation from website)?


    If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'

    Wednesday, November 20, 2013 12:20 AM
  • I have set up the leads from the website to come in as a comma delimited email that the plugin then parses and creates a lead when CRM email is created. So the email comes in, the system tracks it, and creates a new lead in the system. (I ma sure there is a better way but this works). The last piece though is getting the new lead to be easily accessible so that I can assign it out. I tried setting the plugin to update/set the regardingobjectid field so that in the email I could click the regarding link from my email but I always get an error.

    So option #2 was to see if there was a way that when the lead is created I just prompt from the plugin to open that specific record. I've done something similar with javascript so thought it might be possible with C#.

    Guid LeadId = service.Create(newLead);
    
                                    entity["regardingobjectid"] = new EntityReference("lead", new Guid(LeadId.ToString()));
                                    service.Update(entity);  


    Thanks for the response.
    • Edited by Mich_Ridge Wednesday, November 20, 2013 3:10 PM
    Wednesday, November 20, 2013 3:10 PM
  • Plugins run server side and are not used to interact with the UI.

    The Plugin could be configured to send an email with a hyperlink embedded in the body of the message so that the user can simply click it and open the new record. They can't be made to interact with a specific users browser.

    Friday, November 29, 2013 1:13 PM