Results 1 to 2 of 2

Thread: Can't create required related field for custom module

  1. #1
    jwesley is offline Member
    Join Date
    Jun 2010
    Posts
    6

    Default Can't create required related field for custom module

    I have a one-to-one relationship between projects and a custom module (Building America) and wish to make the project field required for Building America. I see there is a project field available on the layout screens after the relationship was created but it does not display under the fields for Building America so I can't edit it to mark it required.

    I have tried to create a new relate field called proj which I can mark as required but it will not save to the database. The non-required field does seem to save but I don't see it in the table (deg_building_america_cstm) I would expect it to be in.

    It seems like this should be easy to configure but I seem to be missing something or the system has some other issues. I did find a couple things from the diagnostics that could be causing issues...

    In beanFiles.html it had these in orange:
    NO! --- DynamicField is not an index in $beanFiles
    NO! --- Connectors is not an index in $beanFiles
    NO! --- Audit is not an index in $beanFiles

    In the log file I keep getting this error:
    [FATAL] Error fetching relationship from cache deg_building_america_project

    This was from a relationship I created in the module builder while troubleshooting but have since deleted. The relationship I am using is only available in studio and is called project_deg_building_america. I have tried repairing and rebuilding relationships but that deleted relationship error won't go away.

    I am using Sugar Professional Version 5.2.0l (Build 5843).

    Any advice would be appreciated.

  2. #2
    jwesley is offline Member
    Join Date
    Jun 2010
    Posts
    6

    Default Re: Can't create required related field for custom module

    Update:

    I was able to make the Projects field created by the relationship required after reviewing this thread:

    http://www.sugarcrm.com/forums/showthread.php?t=51559

    Adding:
    'required' => true,
    to:
    sugarcrm\custom\Extension\modules\deg_Building_Ame rica\Ext\Vardefs\customproject_deg_building_americ a.php

    I couldn't do the more elegant solution in the editviewdefs file because the project field was not listed in that file.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2010-05-11, 10:30 AM
  2. Create Relationships Relate field in custom module
    By hrtrulz in forum Developer Help
    Replies: 1
    Last Post: 2010-03-04, 03:58 PM
  3. How to create Remainder field in custom module?
    By shyam007 in forum Developer Help
    Replies: 0
    Last Post: 2009-04-20, 11:21 AM
  4. Related field to custom module
    By Billwobo in forum Help
    Replies: 2
    Last Post: 2008-07-03, 12:05 PM
  5. Replies: 1
    Last Post: 2008-06-16, 01:01 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
  •