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)

Enter multiple data while creation

(0) ShareShare
ReportReport
Posted on by 2,737
Today,I'm struggling with the approach I have to take.Suppose for Contact entity,I have to enter number of addresses(each set of address having street,postal code,province,country etc).Initially I decided to create a new custom address entity and had its subgrid on contact.But Subgrid can be enabled after contact record creation. What is the best way to achieve the same?

*This post is locked for comments

I have the same question (0)
  • Royal King Profile Picture
    27,686 on at

    You can't relate address record until you save a contact , System can't add child record  to parent that does not exists.

    There is no need to create new custom entity to have multiple address for a contact. You can use default Address entity to add multiple address to a Contact. You can add address entity  subgrid within the Contact entity to add multiple Addresses. Address entity is a special entity where it does not allow you to add Parent lookup value in the form as well crm by default disables new button  when you add address entity in the site map as well when you do Advanced find.   

  • RahulGupta1307 Profile Picture
    2,737 on at

    Thanks Chitra for your reply.But I'm just giving an example of address entity.It could be any collection like Income Sources,Companies etc.

    Yes,you are correct,we cannot add child record until I create parent record.

    That's the problem is I want to add multiple addresses/Income Sources etc while creating of contact record so that I can enter number of records as well as the contact form does not become lengthy.

  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi Rahul,

    CRM does support entering Address in Account or Contact (you can enter without saving first), but can only afford until 2 addresses.

    If you see there are two Address fields, Address 1 and Address 2 (composite fields + individual field collection), I think you are referring to this feature.

    Means that can input before create parent record, but in fact after you fill the value, CRM will automatically save it and store those 2 addresses to address entity that you can see through subgrid or associated view, just if you need address 3 and so on you cannot enter in the Account/Contact, you have to input in the Address subgrid/associated view.

    Anyway, you can use this concept, if you want, but it is not recommended to have a lot of fields in the parent record if we can do through Parent and Child.

    But, I understand that this concept is the best way in Data Management.

    So, what you can do is either you create some fields in the parent or you create a UI can be web resources (a custom UI) or dialog, to users to key in their 'any collection like Income Sources,Companies', then after save, you automatically do the same concept in backend, save the parent and then create the related entities records then associate them together..

    You need something like plugin custom code to do in backend.

    Hope this helps!

    Thanks.

  • RahulGupta1307 Profile Picture
    2,737 on at

    Hi Aileen,

    Thanks for the reply.

    You got it right,I was looking for the same.

  • Royal King Profile Picture
    27,686 on at

    As a best approach rather than asking user to enter all the information upfront don't you think let user to enter essential information first and save it. If he needs to add more addresses he can always use subgrid address to add more. Say if user has to leave the system after adding 10 addresses if record is not saved he is going to loose all the information he added . No one likes to loose information they entered especially after entering these many fields.  If user adds address through subgrid you can avoid all the custom code altogether.

  • RahulGupta1307 Profile Picture
    2,737 on at

    Yes Chitra.You are absolutely right but I need to gather all the information before saving of a record so that I can pass user entered data to some third party web service.

  • Royal King Profile Picture
    27,686 on at

    I would recommend passing information to third-party service based on some criteria met on the record rather passing right after creation of the record. As record can be created using different ways like data import ,Using SDK , quick create . It's very hard to enforce Business rule if you just depend on record creation event. when someone creates record using data import , that record may not have related address at all.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans