Hi All,
Is there any way to understand login customers on portal? I need to show different fields on the workspaces to the agents, according to login customers and the other customers. For example, if the customer logins to the portal agent will see field A and B, if the customer is not login to the portal, agent will see just field B.
Thanks
Totally possible.
1. Create a custom field on Contacts table: Logged-In to CP (Yes/No)
2. Create a Custom Model (ContactModel.php) which has two functions: PostLogin and PostLogout
In PostLogin, set the Logged-In field to Yes
In PostLogout, set the Logged-In field to No
3. In hooks.php, add following code:
$rnHooks['post_login'][] = array(
'class' => 'ContactModel',
'function' => 'PostLogin',
'filepath' => ''
);
$rnHooks['post_logout'][] = array(
'class' => 'ContactModel',
'function' => 'PostLogout',
'filepath' => ''
);
4. Now you create a workspace rule which shows/hides fields based on value of Contact.CustomFields.c.logged_in
Your browser version is currently not supported.
Please update your browser to the
latest version.
Totally possible.
1. Create a custom field on Contacts table: Logged-In to CP (Yes/No)
2. Create a Custom Model (ContactModel.php) which has two functions: PostLogin and PostLogout
In PostLogin, set the Logged-In field to Yes
In PostLogout, set the Logged-In field to No
3. In hooks.php, add following code:
$rnHooks['post_login'][] = array(
'class' => 'ContactModel',
'function' => 'PostLogin',
'filepath' => ''
);
$rnHooks['post_logout'][] = array(
'class' => 'ContactModel',
'function' => 'PostLogout',
'filepath' => ''
);
4. Now you create a workspace rule which shows/hides fields based on value of Contact.CustomFields.c.logged_in