Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: Unable to look up account-document relationship

Unable to look up account-document relationship 5 months 6 days ago #70384

  • choang
  • choang's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Hi,
I am having trouble to lookup document id that links with the account.
I am trying to get the document id of the document before_relationship_delete.
Below is logic hook code I am working on
class custom_Accounts_Class {

function remove_doc_site_relation (& $bean, $event) {
$id = $bean->id ;

if ($bean->load_relationship('documents_accounts')) {
$GLOBALS->fatal( "Found relation account/document");
}else
$GLOBALS->fatal( "NOT Found relation account/document");
}
}
HELP!
Thanks
The administrator has disabled public write access.

Unable to look up account-document relationship 4 months 4 weeks ago #70585

  • urdhvatech
  • urdhvatech's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 487
  • Thank you received: 97
  • Karma: 15
Hello,

I assume You have $bean of account module.

Try this
$bean->load_relationship('documents');
Thanks & Regards,
Team Urdhva Tech
Web : www.urdhva-tech.com
Skype : urdhvatech

- Official code partner
- Official Integration partner
The administrator has disabled public write access.

Unable to look up account-document relationship 4 months 3 weeks ago #70615

  • choang
  • choang's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Thank you. I want do retrieve the document id when user edit from Account.

Thanks
The administrator has disabled public write access.
Time to create page: 0.158 seconds
Powered by Kunena Forum