Error creating scalar function "Invalid Object Name dbo.fnMyFunctionName'"
Try refreshing the Intlisense cache.

Hit crtl+shft+R

From SQL Server Management Studio Keyboard Shortcuts


  Refresh local cache


Or under 


  EDIT->IntelliSense->Refresh Local Cache