Results 1 to 2 of 2

Thread: Couple of Q's

  1. #1
    cpscdave is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    36

    Default Couple of Q's

    Hi Sorry if these are dumb questions. Its 1 in the morning (been up since 5am yesterday) and been bashing my head with them. Havent been able to find a answer in older posts

    1) Due to buisness rules we wanted to change primary_address_state from a text field to a drop down. Did that by hand by adding the code to utils.php and EditView.php and then manually changing EditView.html to use <select ....> We then later added a custom field to the module and it overwrote the changes we made to EditView.html not really suprised. HOwever is there a way to prevent this? Or what would've been the correct way to make the change.

    2) As from my other thread we need to send an email when a record is INSERTED with specific parameters to the person the record describes. (ie adding an new employee and sending a welcome letter to that employee). I understand this has to be custom code.

    I have been able to trap the system in a location where I should be able to send the email as well have found a post on what I would need to do to send an email here: http://www.sugarcrm.com/forums/showt...light=workflow

    HOWEVER I cannot tell if we are in an UPDATE or INSERT path. We really only can have the email going when its an INSERT.

    Incase I'm totally off here what I'm trying to do so far.

    Inside of Module.php I've addeed
    PHP Code:
     function call_custom_logic($event$arguments null)
            {
           if(
    mychecks)
              
    sendEmail();
           
    SugarBean::call_custom_logic($event,$arguments);
            } 
    THanks for any help I'm off to bed

  2. #2
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: Couple of Q's

    For #1, you can modify the EditView.php file and do something like this.

    $xtpl->assign("TEAM_OPTIONS", get_select_options_with_id(get_team_array(), $focus->team_id));

    get_team_array() can be replaced with $app_list_strings['arrayname']
    Then, in the editview.html file, you just put {TEAM_OPTIONS} where you would put the <option value=''>value</option> in your select.


    #2 would be custom workflow, that is how i would do it.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 2010-04-01, 04:04 PM
  2. Some REALLY Basic Qs
    By gregb in forum Help
    Replies: 2
    Last Post: 2007-06-18, 03:40 PM
  3. Replies: 5
    Last Post: 2006-02-07, 11:25 PM
  4. A couple of things that would be nice
    By niels in forum Feature Requests
    Replies: 0
    Last Post: 2006-01-23, 02:10 PM
  5. Couple annoying bugs.
    By jscherber in forum Help
    Replies: 0
    Last Post: 2005-09-02, 12:51 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
  •