Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ solved ] Contact Owner - must be same in Accounts
#1
When I change Account assigned to another user, I wish contacts associates this account should be move to new user too.

I remember, in past, is necessary create a custom function for that.

Today there a way, easy to do that, or really need use the CF and workflow for that?
Ranieri
eCRM Web
Reply
#2
That custom function is already included by default. Create a workflow for you accounts modules, select custom function as the task and select the "update contact assigned to" custom function.

BTW, we will shortly have the possibility to do this on any module/field using update field workflow task
Joe
TSolucio
Reply
#3
Thanks,

Works!
Ranieri
eCRM Web
Reply
#4
I tried to create a workflow to do this, but if I only use jobs related to (contacts), but when I want to move another relationship, like documents and tasks


If I try to insert two tasks, in the same workflow, the system will show - duplicate modules not allowed
If I created two tasks, the system will display an error message (below)

BTW, in the attached image, I had to put the second task as inactive, to return a normal operation on my system ...


-o-


Fatal error: Uncaught Error: Call to a member function getId() on string in /usr/share/coreBOS/corebos-master/modules/com_vtiger_workflow/VTWorkflow.php:245 Stack trace: #0 /usr/share/coreBOS/corebos-master/modules/com_vtiger_workflow/VTEventHandler.inc(96): Workflow->performTasks('12') #1 /usr/share/coreBOS/corebos-master/include/events/VTEventTrigger.inc(146): VTWorkflowEventHandler->handleEvent('vtiger.entity.a...', '12') #2 /usr/share/coreBOS/corebos-master/include/events/VTEventsManager.inc(114): VTEventTrigger->trigger(Object(VTEntityData)) #3 /usr/share/coreBOS/corebos-master/data/CRMEntity.php(1185): VTEventsManager->triggerEvent('vtiger.entity.a...', Object(VTEntityData)) #4 /usr/share/coreBOS/corebos-master/modules/Accounts/Accounts.php(108): CRMEntity->save('Accounts', '') #5 /usr/share/coreBOS/corebos-master/modules/Vtiger/Save.php(131): Accounts->save('Accounts') #6 /usr/share/coreBOS/corebos-master/modules/Accounts/Save.php(30): require_once('/usr/share/core...') #7 /usr/share/coreBOS/corebos-master/index.ph in /usr/share/coreBOS/corebos-master/modules/com_vtiger_workflow/VTWorkflow.php on line 245


Attached Files Thumbnail(s)
           
Ranieri
eCRM Web
Reply
#5
in one task of "Update related records" you can only set fields from one module, thus the "Duplicate Modules not allowed" message, that is correct

I replicated your setup, with one workflow and two update related tasks, one for contacts and the other for documents. It worked as expected

Activate full debug and reproduce the error, you probably have some SQL error that will give you a clue of what is happening
Joe
TSolucio
Reply
#6
I found this error ...

2020-02-12T17:25:03-03:00 DEBUG index < getSortOrder
2020-02-12T17:25:03-03:00 DEBUG index > query select vtiger_crmentity.crmid from vtiger_notes
inner join vtiger_senotesrel on vtiger_senotesrel.notesid= vtiger_notes.notesid
left join vtiger_notescf ON vtiger_notescf.notesid= vtiger_notes.notesid
inner join vtiger_crmentity on vtiger_crmentity.crmid= vtiger_notes.notesid and vtiger_crmentity.deleted=0
inner join vtiger_crmentity crm2 on crm2.crmid=vtiger_senotesrel.crmid
LEFT JOIN vtiger_groups
ON vtiger_groups.groupid = vtiger_crmentity.smownerid
left join vtiger_seattachmentsrel on vtiger_seattachmentsrel.crmid =vtiger_notes.notesid
left join vtiger_attachments on vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid
left join vtiger_users on vtiger_crmentity.smownerid= vtiger_users.id
where crm2.crmid=16733 ORDER BY title ASC
2020-02-12T17:25:03-03:00 INFO DB DB >ADODB error Query FailedConfusedelect vtiger_crmentity.crmid from vtiger_notes
inner join vtiger_senotesrel on vtiger_senotesrel.notesid= vtiger_notes.notesid
left join vtiger_notescf ON vtiger_notescf.notesid= vtiger_notes.notesid
inner join vtiger_crmentity on vtiger_crmentity.crmid= vtiger_notes.notesid and vtiger_crmentity.deleted=0
inner join vtiger_crmentity crm2 on crm2.crmid=vtiger_senotesrel.crmid
LEFT JOIN vtiger_groups
ON vtiger_groups.groupid = vtiger_crmentity.smownerid
left join vtiger_seattachmentsrel on vtiger_seattachmentsrel.crmid =vtiger_notes.notesid
left join vtiger_attachments on vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid
left join vtiger_users on vtiger_crmentity.smownerid= vtiger_users.id
where crm2.crmid=16733 ORDER BY title ASC::->[1052]Column 'title' in order clause is ambiguous

if I mark the task in the workflow for moved documents as inactive, others will work well ...
Ranieri
eCRM Web
Reply
#7
https://github.com/tsolucio/corebos/comm...978cc12556

probably fixes it

let us know
Joe
TSolucio
Reply
#8
Yes, solved !

thanks!

You are the best!!
Ranieri
eCRM Web
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)