Yetiforce has a feature "Change Assigned To to a user who edits a record"
which when enabled suppose to change "assigned_to" field to the user who just made the edit.
However, it is not working and i was not able to find a function to do that.
Steps to reproduce the behavior:
"assigned_to" field not changing after a user edit the record. (Option 'Change Assigned To to a user who edits a record' Enabled)
"assigned_to" field changing after a user edit the record. (Option 'Change Assigned To to a user who edits a record' Enabled)
Gitdeveloper
Gitdeveloper
Gitdeveloper
Thats actually a great feature but only if it was working
Hi z0lo,
I investigated about that option and I didn't find any use of that variable. It seems that the "Change Assigned To to a user who edits a record" option in marketing process is not used :confused:
It seems.
Hi z0lo,
I investigated about that option and I didn't find any use of that variable. It seems that the "Change Assigned To to a user who edits a record" option in marketing process is not used πIt seems.
it is just a checkbox which do nothing basically.
When you check this option it wonβt automatically change the owner of a record. When you convert a lead to an account it will only suggest the user who made the conversion to be the owner of the record.
For example, if user A is the owner of the lead, but user B converts the lead, and the option youβre asking about is enable, the pop up window will suggest user B to be the owner of the account.
Hi Paula,
you are right for CONVERSION: Change Assigned To: it works fine.
We are speaking about LEADS: Change Assigned To to a user who edits a record: it seems to be not used. If you tick the option and an user, who has got the role with privileges to change owner, modify a lead, owner doesn't change.
Hi Davide,
sorry, my bad! we were looking at the "leads" tab, not the "conversion" tab. Thanks for the clarification, we'll look into that again.
Paula,
please don't worry. We all have so many things to do and sometimes something escapes us.
:thumbsup:
@konadrian @davide-alghi
<?php
class ChangeOwner
{
/**
* Update Assigned Owner
*
* @param \Vtiger_Record_Model $recordModel
* @throws \yii\db\Exception
*/
public static function AssignedChange(Vtiger_Record_Model $recordModel)
{
\App\Log::trace('Entering AssignedChange');
$userModel = App\User::getCurrentUserModel();
$currentUserId = $userModel->getId();
$leadId = $recordModel->getId();
{
App\Db::getInstance()->createCommand()->update('vtiger_crmentity',
['smownerid' => $currentUserId,],
['crmid' => $leadId])->execute();
}
\App\Log::trace('AssignedChange end');
}
}
please z0lo enclose code between triple-single-quote
@davide-alghi
thats the class i added to my system to have it work as needed.
This option was deleted from crm