Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: code for List view

  1. #1
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default code for List view

    Hai, i need to find out the code for the List view in CE Teams module. Where can i get it?
    As i have been using sql server as back end, and iam getting SQL errors when i open the CE Teams module under admin. I dont see any team list (though i created one) there, it says an error:

    SQL Error : An expression of non-boolean type specified in a context where a condition is expected, near 'AND'.

    Please, can anyone help me where can i find the code for showing the team list?

  2. #2
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: code for List view

    Hi
    check you sugar log file.

  3. #3
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: code for List view

    Iam not aware of it, where can i find it?

  4. #4
    ros.vol is offline Sugar Community Member
    Join Date
    Dec 2008
    Location
    Eastern Europe / Ukraine / Chernivtsi
    Posts
    114

    Smile Re: code for List view

    Hello,

    Look into your config file, there should be such properties:
    'log_dir' => '',
    'log_file' => 'sugarcrm.log',

    by default it is at SugarCRM root folder.

    Cheers,
    Rostyslav Volonchuk

    SugarCRM development and customizations

  5. #5
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Question Re: code for List view

    Ya, i got the log file, Thanks.
    I see the error mentioned as:

    07/23/09 04:57:24 [260][1][FATAL] An expression of non-boolean type specified in a context where a condition is expected, near ')'.: SELECT TOP 21 ceteams.id , ceteams.name , ceteams.parent_team_id , ceteams.description , ceteams.created_by FROM ceteams where ((ceteams.name like 'Ind%') AND 1 ) AND ceteams.deleted=0 AND 1 ORDER BY ceteams.name
    07/23/09 04:57:24 [260][1][FATAL] SQL Server error: An expression of non-boolean type specified in a context where a condition is expected, near ')'.
    07/23/09 04:57:24 [260][1][FATAL] SQL Server error: An expression of non-boolean type specified in a context where a condition is expected, near ')'.

    I dont know whats the problem with the boolean condition where AND keyword is used in the query.
    Can somebody figure out this ?

  6. #6
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: code for List view

    Hi
    you query have some problem so customize your list query.

  7. #7
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: code for List view

    If i know where to customise it, i would have done it by myself. But i could not find where to find the query.
    Iam getting this error message in log, when i try to open CE Teams link in the Admin page. The list has to show the teams, with their name, description, etc. But instead i see an empty list there, and an SQL error at the top.
    Can you please specify where can i look for the query to be modified?
    Iam attaching the screen shot of my page, where i got the error, in place of the Team list.
    Attached Images Attached Images  

  8. #8
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: code for List view

    Quote Originally Posted by dskanth View Post
    Hai, i need to find out the code for the List view in CE Teams module. Where can i get it?
    As i have been using sql server as back end, and iam getting SQL errors when i open the CE Teams module under admin. I dont see any team list (though i created one) there, it says an error:

    SQL Error : An expression of non-boolean type specified in a context where a condition is expected, near 'AND'.

    Please, can anyone help me where can i find the code for showing the team list?
    Edit the file include/ListView/ListViewData.php and add this line
    PHP Code:
            echo "<LI>$main_query</LI>"
    just before the line
    PHP Code:
            $main_query $ret_array['select'] . $params['custom_select'] . $ret_array['from'] . $params['custom_from'] . $ret_array['where'] . $params['custom_where'] . $ret_array['order_by'] . $params['custom_order_by']; 
    This will display the ListView query just bellow the Search Form.

    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.

  9. #9
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: code for List view

    Hai Andopes, thanks for your reply, but after i added the line above the code you suggested, i got a new problem. After i opened the CE Teams module, i got a blnk page, with this error:
    Parse error: parse error in D:\XAMPP\htdocs\sugar-ms\include\ListView\ListViewData.php on line 514
    and many other pages like Home, Leads also show this error, and i cant get rid of it.

    If you are intending to show me the query for list view, i got the query in another way earlier:
    I put this code : echo '<br>SQL Query: '. $sql;
    under the code:
    echo 'SQL Error : ' . mssql_get_last_message();

    in include/database/MssqlManager.php

    I got the query in the CE Teams page as:

    SELECT TOP 21 ceteams.id , ceteams.name , ceteams.parent_team_id , ceteams.description ,
    ceteams.created_by FROM ceteams where ( 1 ) AND ceteams.deleted=0 AND 1
    ORDER BY ceteams.name

    And i also understood the reason for error: It is because of ( 1 ) AND, AND 1
    I need to figure out why the query is built in this way, and from where, the query was passed to this file, for execution.

    Can you point me in the right direction further?

  10. #10
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: code for List view

    HI
    Which version of sugar and CE team module you have used?

    i have used sugar Version 5.2.0e and CETeams-for-SugarCRMCE-5.1.0x-5.2.0x-1.0.5.zip
    this not give any error message.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 2009-06-14, 01:57 PM
  2. Replies: 2
    Last Post: 2008-04-16, 10:32 PM
  3. Replies: 2
    Last Post: 2007-09-11, 05:09 PM
  4. Replies: 0
    Last Post: 2006-07-11, 10:05 PM
  5. Replies: 0
    Last Post: 2006-05-04, 01:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •