How to load a relate field into another field

Hi Everyone,

We currently have a relate field and would like to have the value selected in this field appear in another field on the same module. To my knowledge, it is not possible via studio and a calculated field. Has anyone had any luck loading a relate field to another field? Please note this is not a relationship field either.

Fields:
1. Relate field to users module from opportunities
2. Text field on opportunities module.

Sugar version 10.0.2

Thanks!

Parents
  • I am wondering the same thing as but its easily done in a logic hook.  Something like

    <?php
    
    class accounts_bs_hook
    {
    	/**
    	 * @param Account $bean
    	 * @param string $events
    	 * @param array $arguments
    	 *
    	 * We have 3 different types of accounts and each needs its own Before Save hook
    	 */
    	public function beforeSaveLogic($bean, $events, $arguments): void
    	{
            //The ID from this relate would be
            // $YOUR_TEXT_FIELD_ID_c = $YOUR_RELATE_FIELD_c_owner
            $YOUR_TEXT_FIELD_c = $YOUR_RELATE_FIELD_c;
            
            

Reply
  • I am wondering the same thing as but its easily done in a logic hook.  Something like

    <?php
    
    class accounts_bs_hook
    {
    	/**
    	 * @param Account $bean
    	 * @param string $events
    	 * @param array $arguments
    	 *
    	 * We have 3 different types of accounts and each needs its own Before Save hook
    	 */
    	public function beforeSaveLogic($bean, $events, $arguments): void
    	{
            //The ID from this relate would be
            // $YOUR_TEXT_FIELD_ID_c = $YOUR_RELATE_FIELD_c_owner
            $YOUR_TEXT_FIELD_c = $YOUR_RELATE_FIELD_c;
            
            

Children
No Data