Error: Unhandled script exception: [Microsoft][ODBC SQL Server Driver][SQL Server] Could not find stored procedure Name.dbo.spSmartFill'. error

Why are we getting an Unhandled script exception: [Microsoft][ODBC SQL Server Driver][SQL Server] Could not find stored procedure Name.dbo.spSmartFill’. error when we try to do lookups after creating a new company?

You are getting this message because you are using Custom SQL for one of your SmartFill objects and the stored procedure spSmartFill does not exist in the new company’s database. You can simply copy this stored procedure from an existing company database to the new one and that will give you the same functionality for that object in the new company.

You may need to also grant Execute permission to this stored procedure. You can do this by running the following SQL script:

GRANT EXECUTE ON spSmartFill TO DYNGRP