Results 1 to 2 of 2

Thread: use blank assigned_to

  1. #1
    ckd1987 is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    88

    Talking use blank assigned_to

    Greetingsd

    i made my new custom module, filled with some adresses, but there is a Problem,

    i want import with blank assigned_to , so that all users will access the adresses and after save, there should be there own adresses, and not aviable to see or edit for other users., this was not possible with rolles, if there blank assigend_to, it will also not work..what can i do ?

    thx
    alex


    Sugar CRM 5.2k
    Debian GNU Linux 5 / php5.2 MySQL 5

  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: use blank assigned_to

    You can implement the method "save" at the bean of your module.
    Inside this method you can check if the id is null, then erase the assigned_user_id:

    PHP Code:
    function save($check_notify false) {
      if(empty(
    $this->id)) {
        
    $this->assigned_user_id '';
      }

      
    parent::save($check_notify);

    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. assigned_to field is empty (and it shouldn't)
    By chanegue in forum Installation and Upgrade Help
    Replies: 14
    Last Post: 2010-05-05, 06:30 PM
  2. Replies: 11
    Last Post: 2009-04-06, 06:01 AM
  3. Notifications when created_by = assigned_to
    By lowJack01 in forum Developer Help
    Replies: 0
    Last Post: 2008-09-26, 11:08 PM
  4. Replies: 14
    Last Post: 2007-05-29, 11:09 PM
  5. ModuleBuilder and forced assigned_to?
    By Beagle in forum Developer Help
    Replies: 0
    Last Post: 2006-07-27, 10:38 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
  •