Script out objects that depend on in SQL Server
In SSMS...


Rt Click on the Database in question, navigate to Tasks and then Generate Scripts...
Select Choose Objects on the left and then click the radio button to Select specific database objects
Select the object you wish to script
In Save to file click the Advanced button
6th option down, set Generate Script for Dependent Objects to true
Set any other options you want and click the OK button
Set the File name and path or Save to Clipboard or Save to new query window
Click the Next buttons to finish.