src/Easy/PickerForm.php
public function joinToParent($recIds=null)
    {    	
    	if(!is_array($recIds))
    	{    		
    		$recIdArr = array();
    		$recIdArr[] = $recIds;
    	}else{
    		$recIdArr = $recIds;
    	}
    	
    	$parentForm = Openbizx::getObject($this->parentFormName);
    	$updArray = array();
    	$updRec = $this->parentFormRecord;

    	foreach($recIdArr as $recId)
    	{
        	$rec = $this->getDataObj()->fetchById($recId);
              
	        // get the picker map of the control
	        if ($this->pickerMap)
	        {
	            $pickerList = $this->_parsePickerMap($this->pickerMap);	            
	            foreach ($pickerList as $ctrlPair)
	            {
	                $this_ctrl = $this->getElement($ctrlPair[1]);
	                if (!$this_ctrl)
	                    continue;
	                	                
	                $this_ctrl_val = $rec[$this_ctrl->fieldName];
	                $other_ctrl = $parentForm->getElement($ctrlPair[0]);
	                if ($other_ctrl)
	                {
	                	if(!$updArray[$other_ctrl->objectName]){
	                		$updArray[$other_ctrl->objectName] = $this_ctrl_val;
	                		$updRec[$other_ctrl->fieldName] = $this_ctrl_val;	
	                	}else{
	                		$updArray[$other_ctrl->objectName] .= ';'.$this_ctrl_val;
	                		$updRec[$other_ctrl->fieldName] .= ';'.$this_ctrl_val;
	                	}
	                }
	            }	            
	        }
	        else
	            return;
    	}
    	    	
        $this->close();	                                               
        $elem = $parentForm->getElement($this->parentFormElemName);
        if($elem->updateForm=='Y'){
        	$parentForm->setActiveRecord($updRec);        	
        	$parentForm->rerender();
        }else{
        	Openbizx::$app->getClientProxy()->updateFormElements($parentForm->objectName, $updArray);
        	foreach($updArray as $elemName=>$value)
        	{
        		$elem = $parentForm->getElement($elemName);
        			$elemEvents = $elem->getEvents();
        			foreach($elemEvents as $event=>$function)
        			{
        				if(strtolower($event)=='onchange')
        				{
        					
	        				if(is_array($function)){
								foreach($function as $f){
									$function_str.=$f.";";
								}
							}else{
								$function_str .= $function;
							}
        					Openbizx::$app->getClientProxy()->runClientScript("<script>$function_str</script>");		
        				}
        			} 
        	}
        }                               
    }
public function joinToParent($recIds=null)
    {    	
    	if(!is_array($recIds))
    	{    		
    		$recIdArr = array();
    		$recIdArr[] = $recIds;
    	}else{
    		$recIdArr = $recIds;
    	}
    	
    	$parentForm = Openbizx::getObject($this->parentFormName);
    	$updArray = array();
    	$updRec = $this->parentFormRecord;

    	foreach($recIdArr as $recId)
    	{
        	$rec = $this->getDataObj()->fetchById($recId);
              
	        // get the picker map of the control
	        if ($this->pickerMap)
	        {
	            $pickerList = $this->_parsePickerMap($this->pickerMap);	            
	            foreach ($pickerList as $ctrlPair)
	            {
	                $this_ctrl = $this->getElement($ctrlPair[1]);
	                if (!$this_ctrl)
	                    continue;
	                	                
	                $this_ctrl_val = $rec[$this_ctrl->fieldName];
	                $other_ctrl = $parentForm->getElement($ctrlPair[0]);
	                if ($other_ctrl)
	                {
	                	if(!$updArray[$other_ctrl->objectName]){
	                		$updArray[$other_ctrl->objectName] = $this_ctrl_val;
	                		$updRec[$other_ctrl->fieldName] = $this_ctrl_val;	
	                	}else{
	                		$updArray[$other_ctrl->objectName] .= ';'.$this_ctrl_val;
	                		$updRec[$other_ctrl->fieldName] .= ';'.$this_ctrl_val;
	                	}
	                }
	            }	            
	        }
	        else
	            return;
    	}
    	    	
        $this->close();	                                               
        $elem = $parentForm->getElement($this->parentFormElemName);
        if($elem->updateForm=='Y'){
        	$parentForm->setActiveRecord($updRec);        	
        	$parentForm->rerender();
        }else{
        	Openbizx::$app->getClientProxy()->updateFormElements($parentForm->objectName, $updArray);
        	foreach($updArray as $elemName=>$value)
        	{
        		$elem = $parentForm->getElement($elemName);
        			$elemEvents = $elem->getEvents();
        			foreach($elemEvents as $event=>$function)
        			{
        				if(strtolower($event)=='onchange')
        				{
        					
	        				if(is_array($function)){
								foreach($function as $f){
									$function_str.=$f.";";
								}
							}else{
								$function_str .= $function;
							}
        					Openbizx::$app->getClientProxy()->runClientScript("<script>$function_str</script>");		
        				}
        			} 
        	}
        }                               
    }
Join a record (popup) to parent form

@param <type> $recId
@return void