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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Add attachment field to my custom entity (only single attachment) with upload button in online CRM

(0) ShareShare
ReportReport
Posted on by

i am developing multiple custom entities, i need to add "Upload attachment" field to the entity as upload button control, i google for hours and i don't find  out of the box solution except that one for Notes section but it doesn't fit my requirements, is there any out of the box upload control i can add many times in the entity, if not there can you help me with the links to develop custom one

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Besides using notes to store attachments there aren't really any good out of the box solutions to your problem.

    What I would recommend is integrating SharePoint with Microsoft Dynamics CRM in order to manage your documents. This enables you to store and manage documents on SharePoint in the context of a Microsoft Dynamics CRM record.

    You can find out how to do this here:

    msdn.microsoft.com/.../gg334768.aspx

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    You can add html button using html web resource and through you can open same file browse dialog (you can see that code from ribbon diff file for entity which has notes enable) that we used to get while adding attachment, it will attache all the attachments done under notes.

    Thanks

  • Soma Shekar Profile Picture
    461 on at

    HI,

     look into the following  link

    http://dynamicsobjects.com/Products/Dynamics-Attachments

    This may be help for you.

  • Ahmad Saud Profile Picture
    790 on at

    thanks, can i add a validation to make sure (for example) that user has uploaded certain number of attachments, for example, i need the user to at least upload 4 attachments, is this possible?

    thanks,

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    You can use thateasily using form notification, you can check on form using js if number of attachment is not 4 display a form notification and it not clear it.

    Check my post of the use notification in Dynamics 365 :http://himbap.com/blog/?p=2634

  • Ahmad Saud Profile Picture
    790 on at

    thanks a lot  for your help.

    it will be great of you give me the syntax to check the number of entries in a subgrid.

    thanks,

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You can use something like this:

    function FindSubGridCount() {

    setTimeout(function () {

    if (Xrm.Page.getControl("Subgridname") != undefined) {

    var recordCount = Xrm.Page.getControl("Subgridname").getGrid().getTotalRecordCount();

    return recordCount;

    };

    }, 2000);

    }

    You can also consider using Rollup field for non code solution but it's calculation frequency is 1 hour which you can change through code CalculateRollupFieldRequest, you can refer this post incase want to go for rollup field dynamicscrmpros.com/changing-rollup-calculation-frequency-microsoft-dynamics-crm-2015

  • Ahmad Saud Profile Picture
    790 on at

    thanks a lot.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans