
IF NOT EXISTS (SELECT 1 FROM pal_SurfaceField WHERE surfaceFieldName = 'WholesalerOrderQuoteItems_QuoteItems_AddMoreProducts')
BEGIN

INSERT INTO [dbo].[pal_SurfaceField]
([surfaceId]
,[surfaceFieldName]
,[surfaceFieldDisplay]
,[surfaceFieldTypeId]
,[length]
,[required]
,[lookupCategory]
,[relationalFields]
,[relationalValues]
,[relationalOrderBy]
,[relationalSurface]
,[relationalObject]
,[parentId]
,[sequence]
,[isActive]
,[isGrid]
,[isFilter]
,[colSequence]
,[contentId]
,[defaultToCurrent]
,[isControlled]
,[controlledValue]
,[controlText]
,[isAutoPostback]
,[isHidden]
,[isReadOnly]
,[placeholder]
,[isUnique]
,[actionType]
,[action]
,[actionSource]
,[isComparable]
,[alternateView]
,[isHiddenFromWizzard]
,[surfaceDateTypeId]
,[isHiddenFromView]
,[actionValue]
,[surfaceFieldSize]
,[isLabelHidden]
,[isOnNewLine]
,[labelSize]
,[isHiddenFromForm]
,[accessLevel]
,[hasBottomBorder]
,[hasFullBorder]
,[defaultValue]
,[validationType]
,[enableBulkUpdate]
,[isCurrency]
,[isVerticalHeader]
,[gridSequence]
,[isGrouped]
,[isCloneable]
,[isCustomSource]
,[relationalWhere]
,[groupedDisplayCount])
VALUES
(3099,
N'WholesalerOrderQuoteItems_QuoteItems_AddMoreProducts',
N'Add More Products',
10,
0,
0,
0,
'',
'',
'',
'',
'',
1869,
1,
1,
0,
0,
0,
0,
0,
0,
'',
N'Add More Products',
0,
0,
0,
'',
0,
0,
0,
0,
0,	
0,
0,
0,
0,
'',
3,
1,
0,
12,
0,
1,
0,
0,
'',
0,
0,
0,
0,
11,
0,
0,
0,
'',
0);

END;

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE
	TABLE_NAME = 'publ_WholesalerOrderProducts' AND
	COLUMN_NAME = 'WholesalerOrderQuoteItems_QuoteItems_AddMoreProducts')
BEGIN

ALTER TABLE [dbo].[publ_WholesalerOrderProducts]
ADD [WholesalerOrderQuoteItems_QuoteItems_AddMoreProducts] [varchar] NULL;

UPDATE [dbo].[publ_WholesalerOrderProducts]
SET [WholesalerOrderQuoteItems_QuoteItems_AddMoreProducts] = '';

END;


