Results 1 to 3 of 3

Thread: cancel button problems

  1. #1
    arffup is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    México DF
    Posts
    54

    Default cancel button problems

    Hello everybody.

    I have some custom modules with default save and cancel buttons.

    cancel does that: If I'm editing an existing record (and cancel it) it returns me to the detailview: OK
    If I'm creating a new record (and cancel it) it returns me to HOME!!!!!!!

    I can add the code

    PHP Code:
    array('buttons'=>array(array('customCode'=>'array('customCode'=>'<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" '.
                                '
    accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button"     
                                
    onclick="this.form.return_action.value=\'DetailView\';"  '.
                                '
    type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">), 
    and it controls the problem.............. some times. recently I add a js invoke that uses ajax in order to invoke more php with sql. and cancel button stoped to work properly. Now if I cancel (create or edit) it returns me to a partial listview. If im creating shows me MY elements (assigned to the active user) If Im editing, it shows me the list of the elements assigned to the user who has the element I was editing OK? (Im admin, if I edit and cancel an element assigend to "user2" the list shows me only "user2" elements)

    I found some like this problem in the next thread but it hasn't a real answer

    http://www.sugarcrm.com/forums/showt...ghlight=cancel
    Last edited by arffup; 2008-03-29 at 12:11 AM.

  2. #2
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: cancel button problems

    Hello arffup,

    How did you begin developing your custom module? Did you build the base of it with Module Builder, or just copy some files and begin making changes yourself? If you build the base structure of the module with Module Builder, elements like the Save/Cancel buttons should be taken care of automatically.

    From that point on, you can make any tweaks/customizations you'd like, but at least you'll have an example of what a working Cancel button should look like.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  3. #3
    arffup is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    México DF
    Posts
    54

    Default Re: cancel button problems

    Hello Julian.

    I made my module with the Builder, in fact, the code Builder provides me is the next (for another different custom module)

    PHP Code:
    <?php
    $module_name 
    'Sup1_service';
    $viewdefs = array (
    $module_name =>
    array (
      
    'EditView' =>
      array (
        
    'templateMeta' =>
        array (
          
    'maxColumns' => '2',
    Without buttons. In some forum threads and default modules I knew there is code for buttons.

    The code I included in this post (above) is provided by Builder and if I cancel editing changes, it returns me to detail view, but if I cancel a new element (creation) it returns me to Home, meanwhile every default module returns always to detail view.

    In the module I modified (I added the code in first post) I needed edit "save" functions, so I need add code to save button, and then, sugar only shows me "save button" (withoit cacnel) so I added the new cancel button and it works fine, until I added js functions in "onclick", in this moment is when always returns me to listview and without all elements.l

    I forgot mention: I use Sugar 5.0a, Win Server 2003, Apache 2.2.6

    Andrés

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 2008-01-09, 02:08 PM
  2. Replies: 0
    Last Post: 2007-12-27, 09:51 PM
  3. Inbound E-Mail, problems, problems, problems ...
    By Ericmuc in forum General Discussion
    Replies: 5
    Last Post: 2006-08-16, 10:24 AM
  4. problems with scheduler and times
    By rendezvous in forum Help
    Replies: 1
    Last Post: 2005-12-15, 02:32 PM
  5. Save and cancel button on top AND bottom
    By jobst in forum Feature Requests
    Replies: 2
    Last Post: 2005-10-26, 11:39 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
  •