Get item from combobox using axapta code

Get item from combo box using axapta code. This function will return selected value of combo box control. I hope it can help you to avoid combo box troubleshooting.

 display str telNo()  
 Table1.TelNo = telNo;  
 rec = ComboBox1.selectionChange();  
 officeName = ComboBox1.getText(ComboBox1.selectionChange());  
 parentOffice1 = Table1.ParentOffice;  
 return CustTable::find(CustTable.AccountNum).Phone;