title: SQLServer cannot find my user defined function function in stored procedure
body: <p>I must have some permissions wrong, but I can't figure out how. The following code is simplified but I can't even get this to work</p>
  
  <pre><code>CREATE FUNCTION ufTest 
  (
      @myParm int
  )
  RETURNS int
  AS
  BEGIN
      DECLARE @Result int
  
      SELECT @Result = @myParm + 1
  
      RETURN @Result
  END
  GO
  </code></pre>
  
  <p>Then I just want to be able to call the function from a stored procedure:</p>
  
  <pre><code>CREATE PROCEDURE dbo.[uspGetGroupProfileService]
  @id        int
  AS
  BEGIN
      SET NOCOUNT ON;
      DECLARE @otherId int;
      SET @otherId = dbo.ufTest(@id);
  END
  </code></pre>
  
  <p>SQLServer keeps telling me that it can't find <code>dbo.ufTest</code>. It shows up under [DB]\Programmability\Functions\Scalar-valued Functions but I can't figure out how to use it.</p>
  
  <p>Anybody have any idea what I'm doing wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>As indicated by the selected answer below, you can't always trust the SSMS Intellisense. One thing that you can try, other than just trying to execute the script, is forcing an Intellisense refresh with CTRL + SHIFT + R</p>
  
  <p><a href="https://blog.sqlauthority.com/2013/07/04/sql-server-how-to-refresh-ssms-intellisense-cache-to-update-schema-changes/" rel="nofollow noreferrer">https://blog.sqlauthority.com/2013/07/04/sql-server-how-to-refresh-ssms-intellisense-cache-to-update-schema-changes/</a></p>