Results 1 to 3 of 3

Thread: Opportunitiy List Changes

  1. #1
    bryansmithiu is offline Junior Member
    Join Date
    May 2010
    Posts
    2

    Default Opportunitiy List Changes

    Hello, I am new to Sugar and PHP(I do have development experience). I have added a check box to the opportunity basic search, when checked I need to show the list in a very specific way(By date-modified within 10 days, then sales status). I am unsure where the query is for that list. I have looked at the Modules/Opportunities/Opportunity.php file however changes that I make do not appear on the list. Am I looking at the wrong place? How do I add the value of the checkbox to a parameter and get to the query?

    Thank you 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: Opportunitiy List Changes

    Hi Brian

    You have to do the following:

    Create a custom controller for Opportunities;
    Inside this custom controller implement the method action_listview() containing something like that:

    PHP Code:
    function action_listview() {
      require_once(
    'custo/modules/Opportunities/OpportunityListView.php');

      
    $this->view 'list';
      
    $this->bean = new OpportunityListView();

    Create the script custo/modules/Opportunities/OpportunityListView.php containing the class OpportunityListView which should extends the default Opportunity class.
    Inside this custom class implement the method create_new_list_query. Take a look at this function into data/SugarBean.php, you will see the parameters and return of function.
    Actually you need to modify the $ret_array['where'] in order to apply your specific query according to status of checkbox.

    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.

  3. #3
    bryansmithiu is offline Junior Member
    Join Date
    May 2010
    Posts
    2

    Default Re: Opportunitiy List Changes

    Ok.. I get that and it appears to be working, however my create_new_list_query has taken the place of the original, is there a way to look at the check box and determine whether to use the new method or the old one? Or do i need to bring the old method over to this class and make the necessary changes there?

    Thank you so much for your help!

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: 2008-04-07, 11:21 AM
  2. Replies: 0
    Last Post: 2008-04-07, 06:52 AM
  3. Replies: 3
    Last Post: 2006-06-30, 08:43 PM
  4. Link (and subpanel) between Employee and Opportunitiy
    By kslanicky in forum Developer Help
    Replies: 3
    Last Post: 2006-03-10, 03:02 PM

Tags for this Thread

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
  •