Hi All, I wanted to do some code in the Assigned To user pop-up window, but i am unable to find that page, also please tell me how can i change the query of assigned to user list.
regards,
chetan
Hi All, I wanted to do some code in the Assigned To user pop-up window, but i am unable to find that page, also please tell me how can i change the query of assigned to user list.
regards,
chetan
The files are modules/Users/metadata/popupdefs.php and modules/Users/PopupUsers.php
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Thanks for your answer, but how can i customized the query.
The query written in that format in modules/Users/metadata/popupdefs.php
$popupMeta = array(
'moduleMain' => 'User',
'varName' => 'USER',
'orderBy' => 'user_name',
'whereClauses' => array(
'first_name' => 'users.first_name',
'last_name' => 'users.last_name',
'user_name' => 'users.user_name',
'is_group' => 'users.is_group',
),
'whereStatement'=> " users.status = 'Active' ",
'searchInputs' => array(
'first_name',
'last_name',
'user_name',
'is_group'
),
);
but i want in this way;
select user_name from users
actually i wants to put some hierarchy on this page please help me out
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
also please one more thing, how can join table.
$popupMeta = array(
'moduleMain' => 'User',
'varName' => 'USER',
'orderBy' => 'user_name',
'whereClauses' => array(
'first_name' => 'users.first_name',
'last_name' => 'users.last_name',
'user_name' => 'users.user_name',
'is_group' => 'users.is_group',
),
'whereStatement'=> " users.status = 'Active' ",
'searchInputs' => array(
'first_name',
'last_name',
'user_name',
'is_group'
),
);
i want to join user table with the accounts table, actually i have added a column account_id in users table so now i want to join account table with the users table
please tell how can i join table
The account_id field is not enough to make SugarCRM automatically join both tables and the 'whereStatement' only deal with 'where clauses'.
Also it is not a good idea to add a new field into users table. This is not an upgrade safe customization.
You should create a custom field instead.
You need to modify the modules/Users/PopupUsers.php to implement the join.
Kind regards
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Is it possible to put my query to get user listing except modules/Users/metadata/popupdefs.php this
actually i want my customized query and i want some conditions
actually my bussiness logic is the following
Karepartners,Secretariat, Agency are Accounts
I have added a Account Name to the User Management, wherever any new user will be created that user must be belong to any Account. That means every user associated with the Accounts.
Here is the scenario
1. No one outside Karepartners should be able to assign tasks to Adi
2. Agency should only be able to assign tasks to the Secretariat.
3. Secretariat can assign to Agency or Karepartners.
4. Karepartners should be able to assign tasks to anyone.
now i want to code like this;
if(loggedinuser == karepartner(account))
{
query 1
}
else if(loggedinuser == Secretariat (account))
{
query 2
}
else if(loggedinuser == Agency(account))
{
query 3
}
please tell how can do this thing to get my Filtered Users
You may create the file custom/modules/Users/controller.php and define the method action_popup.
The code could be:
Inside the script UserForPopup.php you may define the class UserForPopup which extends the user and define the method create_new_list_query.PHP Code:function action_popup() {
require_once('custom/modules/Users/UserForPopup.php');
$this->view = 'popup';
$this->bean = new UserForPopup();
}
Take a look at this function into data/SugarBean.php
Actually what you need to do is override the $ret_array elements according to your needs.
Kind regards
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
sir, I have made this file UserForPopup.php, the content of the file is:
What you mean byCode:<?php class UserForPopup extends User { function UserForPopup () { } function create_new_list_query() { print '<pre>'; print_r ($_REQUEST); print '</pre>'; } } ?>is create a new method on that class right? It seems the method never executed coz I never see the result of that print statement.Inside the script UserForPopup.php you may define the class UserForPopup which extends the user and define the method create_new_list_query.
Care for giving more advice for newbie?
Thank you sir
I have tried the following files:
/custom/modules/Users/controller.php
/custom/modules/Users/UserForPopup.phpCode:<?php class UsersController extends SugarController { function action_popup() { require_once('custom/modules/Users/UserForPopup.php'); $this->view = 'popup'; $this->bean = new UserForPopup(); } } ?>
HelpCode:<?php class UserForPopup extends SugarBean // I have tried to extends User { function UserForPopup () { } function create_new_list_query() { $ret_array = array ( 'select' => 'SELECT *', 'from' => ' FROM users', 'where' => '', 'order_by' => ' user_name', ); return $ret_array; } } ?>![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks