Restore an accidentally deleted image in BBIS

Ever had an image accidentally deleted in BBIS? Read on to find out how to restore it!

Images in BBIS are handled via an image handler and are stored in the database. Before restoring the database give this a try.

declare @IMAGEID int = 3558;
declare @IMAGEKEY nvarchar(50) = 'Image_' + cast(@IMAGEID as nvarchar(10)) + '_0',
@CURRENTDATE datetime = getdate();

update SITEIMAGES set DELETED = 0, INTRASHBIN = 0 where ID = @IMAGEID;
exec spAddUpdate_CacheItem @IMAGEKEY, @CURRENTDATE, 0;

🙂 Happy coding!

* this has only been tested in BBIS 6.64.166.0 (CRM 4)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s