Creating Stored Procedure for Company Images Sync

This document describes the pre-requisite steps for configuring the Image Sync Utility. In order to get the Company logos for the e-Business Company Details page, you must follow the steps mentioned below.

  1. Log in to the Aptify Smart Client application as an administrator.
  2. Expand the Framework application, right-click Database Objects service and select the New Database Objects Record option. DBO_1.png
  3. Enter the details exactly as given below:
    1. Name - spGeteBusiness7_0CompanyImages
    2. Description - Responsible for retrieving list of company images.
    3. DB - APTIFY
    4. Type - Stored Procedure
    5. SQL - 
      CREATE PROCEDURE [dbo].[spGeteBusiness7_0CompanyImages] 
      AS
      BEGIN
      declare @tablename varchar(50)
      set @tablename = (select distinct BaseView from vwSyncImageRecords where EntityName = 'Companies')
      
      declare @EntityName varchar(50)
      set @EntityName = 'Companies'
      
      DECLARE @sSQL nvarchar(500);
      
      
      SELECT @sSQL = N'SELECT TempProduct.ID,TempProduct.Name,s.CategoryName,s.EntityName,s.FieldName,r.Height,r.Width,r.ImageFormat,r.NamingConvention,r.SyncPath,r.NoImage as NoImageORO_ID FROM ' + @tablename + ' as TempProduct inner join vwSyncImageRecords s on
      s.EntityName = ''' + @EntityName + ''' inner join vwSyncImageCategories r on r.ID=s.Category order by TempProduct.ID'
      
      EXEC sp_executesql @sSQL
      END
      
    6. Grant SQL - 
GRANT EXECUTE ON spGeteBusiness7_0CompanyImages TO EndUsers

DBO_2.png

DBO_3.png

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.