Default assigned user

Hi,

In Sugar 7.7.1.0, I'm trying to create a record with a default assigned user different than the current user.

I've tried with:

$dictionary['my_module']['fields']['assigned_user_id']['default'] = '<user_id>';

but without success. 

Any one can help me?

P.S.: At this point my only way is do this with a before_save hook.

Parents
  • Rolustech Support's third option is to achieve this with a before_save logic hook.

    Attached is an example of an application logic hook that was designed and tested in 7.10.2.0 Enterprise using demo data.

    This package is installable on any version and edition of Sugar.

    The defaultUser.php file needs to be edited to use ID numbers for users of your instance before it will work in your instance of Sugar.

    The attached application logic hook detects if the record is being created and if it is assigned to demo user Will Westin. If both criteria are met, the record is reassigned automatically to demo user Chris Olliver upon save.

    Because this hook is added at the application level, it applies this automation to all modules.

Reply
  • Rolustech Support's third option is to achieve this with a before_save logic hook.

    Attached is an example of an application logic hook that was designed and tested in 7.10.2.0 Enterprise using demo data.

    This package is installable on any version and edition of Sugar.

    The defaultUser.php file needs to be edited to use ID numbers for users of your instance before it will work in your instance of Sugar.

    The attached application logic hook detects if the record is being created and if it is assigned to demo user Will Westin. If both criteria are met, the record is reassigned automatically to demo user Chris Olliver upon save.

    Because this hook is added at the application level, it applies this automation to all modules.

Children
No Data