CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Automatically Assign Relationship Between Individual & Organization via Webform
Pages: [1]

Author Topic: Automatically Assign Relationship Between Individual & Organization via Webform  (Read 733 times)

KamesCG

  • I’m new here
  • *
  • Posts: 15
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Automatically Assign Relationship Between Individual & Organization via Webform
February 17, 2015, 01:49:30 pm
I have 4 separate Organization forms (Farm, Ranch, Fishery, Artisan) that are available on the Drupal Front-End at website.com/application/* - When the form is submitted the organization is created, but is not associated with the user who created the Organization.

I apply Roles permission based on Rules events. I was hoping I could do the same thing for CiviCRM relationship, but didn't see anything in Rules that would accomplish this.

Assuming this is probably is a common task in Drupal and CiviCRM I was hoping it would be a little more intuitive, but it has gone over my head.

TLDR: How do I add a CiviCRM relationship between Individual and Organization based on Webform submissions?
« Last Edit: February 17, 2015, 05:16:34 pm by KamesCG »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 17, 2015, 05:29:27 pm
I'm not sure how you set up the webforms but you may need to re-do them a bit.
  • Contact 1 should be type Individual as it represents the person filling out the form
  • You don't necessarily need to expose any fields for Contact 1, it just needs to exist (and you'll want the "Existing Contact" field enabled and set to be hidden and autofilled with current user, which is the default).
  • Contact 2 can be the org.
  • In the Contact 2 "Relationships" tab set the relationship you want to contact 1

I'm guessing that you may have made the mistake of setting contact 1 as the org. Here's a tip for changing it without having to recreate all of your work:
On the Webform tab, click the "clone contact" button by the org. That will add the same org as contact 2. You can then change contact 1 to individual and strip away the fields you don't need.
« Last Edit: February 19, 2015, 11:10:42 am by Coleman Watts »
Try asking your question on the new CiviCRM help site.

KamesCG

  • I’m new here
  • *
  • Posts: 15
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 10:51:12 am
You are the man! Thank you for taking the time to reply :)

I did make the mistake of setting up Contact 1 as the Organization.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 11:14:49 am
No prob. If you haven't already, can you click "commit" to the new CiviCRM SE Help Site?
It's about to become an even better place to get help with this kind of thing, all we need is a few more people to join before it launches.
Try asking your question on the new CiviCRM help site.

KamesCG

  • I’m new here
  • *
  • Posts: 15
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 11:31:08 am
Super down! I have committed and ready to participate  ;D

Anything I can do to help spread the word?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 11:43:39 am
We just need 10 more people to commit who have rep on another SE site. Sorry I don't know your SE username so I don't know if you already have that or not, but it's what we need most right now.
See http://discuss.area51.stackexchange.com/questions/18465/please-link-your-other-se-accounts
Try asking your question on the new CiviCRM help site.

KamesCG

  • I’m new here
  • *
  • Posts: 15
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 12:30:53 pm
Should be the latest one now - silly email confirmation  :P

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 12:52:18 pm
I see you now :)
It would be incredibly awesome if you were to do a few more posts on Drupal Answers so you reach the 200 rep threshold. I just up-voted a couple of yours so you're already on your way :D
Try asking your question on the new CiviCRM help site.

KamesCG

  • I’m new here
  • *
  • Posts: 15
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 01:35:05 pm
Awesome sauce! I Twitter spammed everyone I know, so hopefully that will give a little boost :)

http://drupal.stackexchange.com/questions/149050/creating-a-responsive-menu-system-for-a-site-with-a-lot-of-content/149099#149099

http://drupal.stackexchange.com/questions/149097/redirect-to-main-view-url-when-no-contextual-filters-are-set/149100#149100
« Last Edit: February 19, 2015, 01:48:50 pm by KamesCG »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 19, 2015, 02:01:32 pm
Sweeeet! Your rep just shot up 45 points in 45 minutes (wasn't all me either). At this rate you'll be at 200 in a couple hours ;)
Try asking your question on the new CiviCRM help site.

KamesCG

  • I’m new here
  • *
  • Posts: 15
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automatically Assign Relationship Between Individual & Organization via Webform
February 20, 2015, 08:43:44 pm
Yay - made it  ;D

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Automatically Assign Relationship Between Individual & Organization via Webform

This forum was archived on 2017-11-26.