Forums

Forums / Bugs & Issues / Create an account on user registration

Create an account on user registration

Thread is closed for posting
7 posts, 1 answered
  1. Missing user
    Missing user avatar
    16 Mar 2016
    Link to this post
    Hello,

    I'm trying to create an account associated with a new user on registration. I have done a custom form with a CRM Form Configuration to create the new user and inside I have another CRM Form Configuration related to Account entity and the "contact.parentcustomerid -> account.accountid" relationship.

    The new user is created, but the account is not and therefore not associated with the new user.

    Is it the right way to achieve this with nested forms ?

    Thank you in advance

    Regards,
    Julien
  2. Missing user
    Missing user avatar
    16 Mar 2016 in reply to Missing user
    Link to this post
    Hi Julien,

    I have prepared a quick example of creating a new Contact & Account.



    The top most Form Configuration has been set to Contact, and the nested form set to Account. The Accounts' CRM Relationship has been set to '​account.primarycontactid -> ​contact.contactid', which will successfully create both records and associate the newly created Account record with the newly created Contact Record.



    Additionally, here is some documentation relating to the scenario that I based the aforementioned example ​off of.

    Please let us know if you have any more questions.

    Kind Regards,

    Chris Rooney.
    Last modified on 16 Mar 2016 15:03 by Missing user
  3. Missing user
    Missing user avatar
    16 Mar 2016 in reply to Missing user
    Link to this post
    Thanks Chris for the answer, I tried with your example and it is working.

    The only problem is that I would like to set the account with the parentcustomerid and that is not working. Do you know why ?

    Regards,
    Julien
  4. Missing user
    Missing user avatar
    16 Mar 2016 in reply to Missing user
    Link to this post
    Hi Julien,

    I have quickly checked the Account entity and found that the Account entity does not contain an attribute called 'parentcustomerid' ( I even got an error when I attempted to submit a form with that relationship selected ). However, the Contact entity does contain this attribute.

    The Account entity does contain a 'primarycontactid' if this would be more useful for your scenario.

    Kind Regards,

    Chris Rooney.
    Last modified on 16 Mar 2016 15:03 by Missing user
  5. Missing user
    Missing user avatar
    16 Mar 2016 in reply to Missing user
    Link to this post
    Hi Chris,

    In my scenario, I would like to set the company for a contact and not defined the contact as primary contact. for the company. If the "contact.parentcustomerid -> account.accountid" relationship is not the correct one, I do know how to achieve that ?

    Regards,
    Julien
  6. Missing user
    Missing user avatar
    Answered
    16 Mar 2016 in reply to Missing user
    Link to this post
    Hi Julien,

    Just checking my understanding: You would like for the new Account record to be hooked up to the Company lookup field on the newly created Contact, correct?

    I tinkered with my example and did just that. In order to do this, you will have to reverse the forms so that Account is on top with the Contact form nested inside.

    Then, I set the nested Contact Form Configuration CRM Relationship to 'contact.parentcustomerid -> account.accountid'.

    Submitting the form will create both a new Account and Contact record with the new Contact record having its Company lookup set to the newly created Account record.

    Kind Regards,

    Chris Rooney.
    Last modified on 16 Mar 2016 16:03 by Missing user
  7. Missing user
    Missing user avatar
    16 Mar 2016
    Link to this post
    Hi Chris,

    I thought that the relationship was working both side. I reversed the forms (Account as main form) as you mentionned and set the relationship to 'contact.parentcustomerid -> account.accountid' and it is working well.

    Thank you for resolving my case

    Julien
    Last modified on 16 Mar 2016 17:03 by Missing user
7 posts, 1 answered