Results 1 to 2 of 2

Thread: OpenSales: how to add a new account field

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

    Default OpenSales: how to add a new account field

    I'm using OpenSales by Rustin Phares I only use Products and Quotes version 1.0.0rc1 and SugarCE 5.0a

    In Quotes module when you select an Account, automatically fills the fields address, state, city, country, postal..... I want to add a new field in this list.

    Maybe I want to add the sic_code (Account field) so I modify EditView.html in order to add the new textbox, add the new variable in vardefs, and I add the label to my field.

    In Quotes side sic_code would be named rfc.

    I search in EditView.php and modify:

    PHP Code:
    $popup_request_data = array (
          
    ´call_back_function' => 'set_return',
         '
    form_name'            => 'EditView',
    .......................................................
           '
    id' =>'billing_account_name',
    ......................................................
          '
    billing_address_country' => "billing_postal",
           '
    sic_code           =>   "rfc",
       ),
    ); 
    the next line use popup_request_data into encoded_billing_account_popup_request_data, used in EditView.html in order to call every account field necesary.

    some lines below (editview.php):

    PHP Code:
    $xtpl -> assign ('BILLING_ACCOUNT'$focus->billing_account);
    $xtpl -> assign ('BILLING_ACCOUNT_ID'$focus->billing_account_id);
    ...............................................
    ...............................................
    $xtpl -> assign ('BILLING_STATE'$focus->state);
    $xtpl -> assign ('RFC'$focus->rfc); 
    I think this is enough but I can't have the rfc (or sic_code) If I manually fill the field, the content is correctly saved in DB and correctly shown in DetailView and further EditView, but If I use the button select in order to call n Account, I obtain the default fields for accounts in Quotes and a blank space in my new field.

    So the problem is when I call the account and I not obtain my value. How can I fix this issue?

    Thanks

  2. #2
    ardn0001 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    52

    Arrow Re: OpenSales: how to add a new account field

    Maybe you should rename the field 'name' from the Account module to RFC, this will fix your problem.

    When the system do a search into accounts it will return the field 'name'

    By the way thanks for your solution, i was trying to find the easiest way to add a field into opensales ....

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2008-07-15, 11:26 PM
  2. How to add a field in a search field
    By jlabuelo in forum Developer Help
    Replies: 1
    Last Post: 2008-05-29, 02:46 PM
  3. Replies: 5
    Last Post: 2007-04-26, 07:43 PM
  4. Replies: 0
    Last Post: 2007-04-25, 06:16 AM
  5. Replies: 0
    Last Post: 2005-09-09, 10:33 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
  •