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 »
  • Using Profiles (Moderator: Dave Greenberg) »
  • This profile is configured for contact type 'Organization'. It cannot be used to
Pages: [1]

Author Topic: This profile is configured for contact type 'Organization'. It cannot be used to  (Read 1514 times)

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
This profile is configured for contact type 'Organization'. It cannot be used to
October 19, 2011, 07:40:16 am
I'm trying to allow a user to update some information about the organization he belongs to - for example a contact phone number and email.

I thought that by creating a custom profile displaying these fields, he could do it - however, I keep getting the message "This profile is configured for contact type 'Organization'. It cannot be used to edit contacts of other types."

Is there any way around this or am I going to have to hand code the update form in PHP?

Thanks

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 19, 2011, 11:11:35 am
One route is to use permissioned relationships. If you have a Relationship between the two that is set to be 'permissioned' such that A can see and edit B (a setting in the Relationship), then Person A can see and edit contact details about Org B via their Contact Dashboard.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 20, 2011, 03:42:08 am
Sounds good - how do i set that up.

Example

person A, person B and person C are "employees of" company D

If I only wanted Person A and person B to be able to update Company D, what would I need to do.

Thanks

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 20, 2011, 10:55:09 am
Go to the Org record.
Add a Relationship for 'employer of' for Person A (or do it from Edit screen of Person A)
WHen adding it, mark record as 'current employer' and tick the 'Contact B can view and edit Contact A'
Voila
Repeat for B
Do not repeat for C.

May not give you everything you want but could be the right route.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 21, 2011, 10:38:06 am
Thanks

I'va actually hand coded the update routine now.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 21, 2011, 11:55:47 am
Care to share you code in case it is of use to others?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 22, 2011, 01:26:02 am
It's just PHP code that calls the APIs

I'm not sure the client would be all that happy about me sharing code they're paying me to write. But basically it's APIs to get the information, display it on a form, call the same PHP code, use APIs to update the information then redisplay the form to finish

Simple but time consuming

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 22, 2011, 06:51:51 am

hmm, might want to check with your client on it. Not sure if you see the irony in your reply. BUT you and your client are using FREE and OPEN source software AND also asking (and getting) help on a FREE forums

The open source ecosystem is driven by the concept of sharing :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

trevorwood

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 4
  • CiviCRM version: 4.0.2
  • CMS version: Joomla 1.6
  • MySQL version: 5.0.51a
  • PHP version: 5.2.6-1+lenny8
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 26, 2011, 04:51:24 am
True, but I don't know how helpful the code will be (basically because there's additional fields updated, etc.). I can describe the logic, and developers can write their own code around it

so here goes

call this code using jumi from an article

get passed information from form - if it's supplied we're updating

if there's any passed info
     update organisation info using civicrm_api('contact', 'update', $params)
end if

get logged in user's email address (Joomla call)

get the users info (contact)

using 'current_employer' as 'organization_name' get organisation info (uncluding any custom fields)

Display all this in a form

submit button calls this routine again passing over displayed form parameters + organization_name & organization_id as hidden fields

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: This profile is configured for contact type 'Organization'. It cannot be used to
October 26, 2011, 10:57:40 am
Thanks for doing that Trevor.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • This profile is configured for contact type 'Organization'. It cannot be used to

This forum was archived on 2017-11-26.