Results 1 to 5 of 5

Thread: Default value on search

  1. #1
    Pdor is offline Sugar Community Member
    Join Date
    May 2008
    Location
    Treviso, IT
    Posts
    41

    Default Default value on search

    Hi

    It's possible to set a defaut value on multi-select search for all user?
    My target is on case module to display ALWAYS the item of the specified COMMON user, as the other user can view the element assigned to this user. At fact, when i click Cancel on seach layout, really not deselect all value on multi-select field, but remain a specified value (the common user).

    absically, this is modify the "default search" with a choice value...

    Thanks in advance

  2. #2
    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: Default value on search

    Hi Pdor

    it is possible to do.
    You just need to create a custom view.list.php for this module.
    This new view.list.php would set the default value if the clear button had been clicked.

    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.

  3. #3
    Pdor is offline Sugar Community Member
    Join Date
    May 2008
    Location
    Treviso, IT
    Posts
    41

    Default Re: Default value on search

    Hi andopes and thanks for reply

    Many question: where i put the list.view.php? On custom/module/view?
    Inside the file, where i modify the code for tell sugar to include the default value?

    This file is VERY COMPLICATED... for me

    Thanks

  4. #4
    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: Default value on search

    Quote Originally Posted by Pdor
    Hi andopes and thanks for reply

    Many question: where i put the list.view.php? On custom/module/view?
    Inside the file, where i modify the code for tell sugar to include the default value?

    This file is VERY COMPLICATED... for me

    Thanks
    Hi Pdor

    where i put the list.view.php?:
    Into custom/modules/<ModuleName>/views/view.list.php

    Inside the file, where i modify the code for tell sugar to include the default value?:
    Inside the function display(). You need to add an if condition which will check if the Clear button had been clicked. If yes then fill in $_REQUEST the default value for the multiselect field.

    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.

  5. #5
    Pdor is offline Sugar Community Member
    Join Date
    May 2008
    Location
    Treviso, IT
    Posts
    41

    Default Re: Default value on search

    Uhm... i sorry andopes, but i meet several difficulties... i'm not a php guru...

    I found some view.list.php on sugar folder, but i not found the if statement to customize...
    can you give me help to find this?

    Thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Missing Project Task Fields after Upgrade from 4.5.1 to 5.00a
    By dejb in forum Installation and Upgrade Help
    Replies: 57
    Last Post: 2009-01-31, 05:40 AM
  2. List View Population
    By atin in forum Help
    Replies: 5
    Last Post: 2008-04-24, 05:57 AM
  3. SugarCrm 4.0 Patch
    By mgamboa in forum General Discussion
    Replies: 0
    Last Post: 2005-12-21, 04:14 PM

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
  •