Results 1 to 3 of 3

Thread: How To Force relationship generated fields to required?

  1. #1
    lvotusk is offline Junior Member
    Join Date
    Aug 2007
    Posts
    4

    Default How To Force relationship generated fields to required?

    Hi, I have 2 custom modules...

    Shop and Brand

    I want to create a third module stockist that just has in essence the equivalent of a relate field so that each stockist record
    refers to exactly one brand and exactly one shop.

    If I set relationships in Shop and brand as one to many to the stockist module, then the subpanels are correctly added, and
    also when creating a stockist, there are now fields auromatically generated in the layout for me to choose the Shop and Brand to releate to... however, these fields are not "required" and since they are auto-generated, I cannot find where they actually exist for me to change them to required "status".

    Is there any way to fix this, or any easier way to achieve something simiar?

  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: How To Force relationship generated fields to required?

    Hi lvotusk

    In the editviewdefs.php of the middle custom module you can add a displayParams('required' => true) for both relate fields.

    Cheers
    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.

  3. #3
    lvotusk is offline Junior Member
    Join Date
    Aug 2007
    Posts
    4

    Default Re: How To Force relationship generated fields to required?

    Many Thanks - that is exactly what I was after.

    cheers

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. upgraded to 4.5.1e, received "Metadata for table tracker does not exist"
    By sfgeorge in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-09-03, 02:24 PM
  2. problemi step 6 di SugarSuite-Full-4.0.1h
    By lucia in forum Italiano
    Replies: 0
    Last Post: 2006-12-27, 08:50 AM
  3. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  4. Replies: 7
    Last Post: 2006-06-06, 07:56 PM
  5. 4.0.1 Installation Problem
    By clawton in forum Help
    Replies: 14
    Last Post: 2006-02-13, 04:17 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
  •