locked
Export To Excel Plugin c# . RRS feed

  • Question

  • Hi,

    i need to restrict few attribute to get export, while export to excel  in crm Using plugin.

    * How to restrict attribute while exporting. 
    * Is there any plugin assembly to restrict this oob functionality. 
    * How to proceed on this further.

    Plz, provide me sample plugin, c# source code. Any links 

    I am blank in this requirement.

    Thanks

    Friday, October 31, 2014 3:27 PM

Answers

  • There is only a certain amount you can do. There are 2 issues:

    • In some circumstances you can identify in a plugin if the RetrieveMultiple is for an export to Excel. You can do this by accessing the HttpContext, but this is only possible if the plugin is not registered in the sandbox, and also only works if the user is using the browser, rather than Outlook
    • The RetrieveMultiple message is used for a static export to Excel, but a Dynamic Export bypasses the plugin model

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk  http://www.core.co.uk


    Thursday, November 6, 2014 11:33 AM
    Moderator
  • Thanks  DavidJennaway .. 

    • Marked as answer by kMAT1 Thursday, November 20, 2014 10:56 PM
    Sunday, November 16, 2014 12:48 PM

All replies

  • Try to write plugin on Retrievemultiple and check for data and try to remove your attributes from propertybag.

    Microsoft Dynamics CRM Training|Our Blog | Follow US | Our Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Friday, October 31, 2014 4:08 PM
    Moderator
  • Hi Mahender Pal,

    thanks for the reply. 
    i just want to remove the attribute only on excel export option. 

    if i write a plugin on retrieve multiple , and try to remove the attribute , in my views also all the attribute gets removed. 

    the user need to view all the attribute in crm . only need to remove in excel export. 

    is there any specific message / any thing need to be tweek or bye pass while excel export opertation gets performed. 

    Kindly guide to achieve on this scenario .

    Thanks
    Tuesday, November 4, 2014 7:42 AM
  • ANY Updates !!!.. 

    Thanks

    Tuesday, November 4, 2014 10:34 AM
  • Any Help .!
    Wednesday, November 5, 2014 5:54 AM
  • There is only a certain amount you can do. There are 2 issues:

    • In some circumstances you can identify in a plugin if the RetrieveMultiple is for an export to Excel. You can do this by accessing the HttpContext, but this is only possible if the plugin is not registered in the sandbox, and also only works if the user is using the browser, rather than Outlook
    • The RetrieveMultiple message is used for a static export to Excel, but a Dynamic Export bypasses the plugin model

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk  http://www.core.co.uk


    Thursday, November 6, 2014 11:33 AM
    Moderator
  • Thanks  DavidJennaway .. 

    • Marked as answer by kMAT1 Thursday, November 20, 2014 10:56 PM
    Sunday, November 16, 2014 12:48 PM
  • Thanks  For DavidJennaway .. 

    after a long debug process , 

    all my effort gon into Negative ..

    Note :I did in Online instance 

    Thursday, November 20, 2014 10:58 PM