Results 1 to 2 of 2

Thread: Passing Data To Custom Field in SubPanel

  1. #1
    banning's Avatar
    banning is offline Sugar Community Member
    Join Date
    Jul 2010
    Location
    Kansas
    Posts
    73

    Exclamation Passing Data To Custom Field in SubPanel

    Ok im sure some people here are thinking here we go again someone else asking... im sorry i've been using SugarCRM for like 2 days and its REALLY important that i figure this program out asap...

    --problem

    when you are on a contact "profile" page if you will... there are subpanels below. On the "Opportunities" panel (when creating an entry using the quickcreate) I have entered a custom field for entering and associating a contact name to the opportunity.

    NOW i realize that if you create an opp from this page it will associate to that contact BUT the client wants to see a disabled input field prepopluated with the contact name.

    SO how do i do this... i keep trying to find a solution for it and can't really seem to find anything. Some people say make a new widget others say class still others seem to think all you have to do is manipulate an array. I need help it would be nice if it was as easy and modifing one of the php fields under the Opportunities module directory.

    Thank you for your help.

  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: Passing Data To Custom Field in SubPanel

    Hi Banning

    You need to:
    create a relate field (Contacts);
    add this field on detailview and editview;
    create a custom controller.php for Opportunities and implement the method action_editview. Inside this method you need to check if $this->bean->id is empty. If so, then you have to check if parent is a Contact. Then you need to populate relate field with contact_id and contact_name.
    update editviewdefs.php in order to hid the buttons for relate field and also to make it read only.

    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. History Subpanel Custom Field Data Missing
    By lmsservices in forum Developer Help
    Replies: 11
    Last Post: 2011-05-20, 09:18 AM
  2. Passing data to subpanel quick create
    By eggsurplus in forum Developer Help
    Replies: 12
    Last Post: 2010-05-13, 02:15 AM
  3. Logic Hook + Passing Date to Custom Date Field
    By chrislynch8 in forum Developer Help
    Replies: 12
    Last Post: 2009-07-22, 03:58 PM
  4. subpanel data not getting in the field
    By zohaib in forum Developer Help
    Replies: 0
    Last Post: 2008-08-07, 09:25 AM
  5. Sub Panel data filed passing issue
    By maxxsir123 in forum Developer Help
    Replies: 0
    Last Post: 2008-02-16, 04:00 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
  •