Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue in Emails::createEmailRecord
#10
Hello, Joe:

Thanks for the quick response

The Database debug returns

Query: insert into vtiger_seactivityrel values('12',13850) failed. Cannot add or update a child row: a foreign key constraint fails (`corallo_8_penultima`.`vtiger_seactivityrel`, CONSTRAINT `fk_2_vtiger_seactivityrel` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE)
1452: Cannot add or update a child row: a foreign key constraint fails (`corallo_8_penultima`.`vtiger_seactivityrel`, CONSTRAINT `fk_2_vtiger_seactivityrel` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE)

ADOConnection._Execute(insert into vtiger_seactivityrel values('12',13850)) % line 1217, file: adodb.inc.php
ADOConnection.Execute(insert into vtiger_seactivityrel values('12',13850), Array[1]) % line 448, file: PearDatabase.php
PearDatabase.pquery(insert into vtiger_seactivityrel values(?,?), Array[2]) % line 152, file: Emails.php
Emails.save_module(Emails) % line 193, file: CRMEntity.php
CRMEntity.saveentity(Emails) % line 1463, file: CRMEntity.php



Fatal error: Uncaught WebServiceException: Database error while performing required operation in /home/coralloagency/www/pruebas/include/Webservices/VtigerEmailOperation.php:78 Stack trace: #0 /home/coralloagency/www/pruebas/modules/Emails/mail.php(795): VtigerEmailOperation->create('Emails', Array) #1 /home/coralloagency/www/pruebas/modules/Invoice/customInvoicePDF.php(240): createEmailRecord(Array) #2 {main} thrown in /home/coralloagency/www/pruebas/include/Webservices/VtigerEmailOperation.php on line 78

The problems is that the params of vtws_getEntityId('Accounts').'x5'; 5 must be the id of the account related to email, not the id of the user, When i change this value, solved. Thanks!!
Reply


Messages In This Thread
RE: Issue in Emails::createEmailRecord - inspectorflint - 09-03-2023, 04:59 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)