Results 1 to 2 of 2

Thread: One-to-Onre Relationships and Create Button

  1. #1
    jpweb is offline Member
    Join Date
    Oct 2009
    Posts
    6

    Default One-to-Onre Relationships and Create Button

    Is there anyway to show a Create button on the Edit and Detail Page Layouts. I want the functionality to be very similar to the Create button that is shown on related lists.

    Is this option available without code? How would you go about implementing this requirement?

  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: One-to-Onre Relationships and Create Button

    Actually there is no way to accomplish that without code.
    You need to:

    Edit the scripts custom/modules/<ParentModule>/metadata/detailviewdefs.php and custom/modules/<ParentModule>/metadata/editviewdefs.php to add the button on layout;
    Create the script custom/modules/<ChildModule>/controller.php and implement the method action_editview(), where you will need to setup some fields to automatically fill the fields which will accomplisht the relationship between ParentModule and ChildModule.

    As you can see, it requires some knowledge to accomplish such task.

    Best 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. Use ID field to create Relationships -- possible?
    By jleaman in forum Developer Help
    Replies: 0
    Last Post: 2009-09-29, 01:44 PM
  2. Replies: 0
    Last Post: 2009-08-06, 03:05 AM
  3. Unable to create relationships with non-module tables
    By rudibr30 in forum Developer Help
    Replies: 2
    Last Post: 2008-09-26, 12:03 PM
  4. Want custom link fields to create relationships
    By evilolive in forum Developer Help
    Replies: 2
    Last Post: 2008-03-27, 01:42 PM
  5. Replies: 0
    Last Post: 2008-02-03, 04:44 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
  •