Hello again!
Another question that I've stumbled into. I'm trying to set up Work Force personnel for quoting. When we started the implementation of quoting, we had a default used, and set the ID as "default".
Now, when I try to delete it, it comes up with the error: "Delete not allowed. Referenced by at least one Customer". I've tried tracing it back to everything I imagine it could have been used for - but it's not being used anywhere.
Places I've checked include:
- Opportunity / Quote
- Sales Orders (No current sales orders)
- Customer Setup
Please note we've only set up Work Force entries for quoting, which is the extent to which we've visited CRM.
Is there any blatantly obvious place I'm missing a record link that is holding up this Work Force entry being deleted?
Kind regards,
Dave.
I think this sql script came from the group and I use it to find all tables that contain the field. you can use to find ‘default’ wherever it exists.
USE [EpicorTest905]
GO
/****** Object: StoredProcedure [dbo].[SearchAllTables] Script Date: 01/25/2016 00:11:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROC [dbo].[SearchAllTables]
(
@SearchStr nvarchar(100)
)
AS
BEGIN
-- Copyright C 2002 Narayana Vyas Kondreddi. All rights reserved.
-- Purpose: To search all columns of all tables for a given search string
-- Written by: Narayana Vyas Kondreddi
-- Site: http://vyaskn.tripod.com
-- Tested on: SQL Server 7.0 and SQL Server 2000
-- Date modified: 28th July 2002 22:50 GMT
CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue
nvarchar(3630))
SET NOCOUNT ON
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128),
@SearchStr2 nvarchar(110)
SET @TableName = ''
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')
WHILE @TableName IS NOT NULL
BEGIN
SET @ColumnName = ''
SET @TableName =
(
SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.'
+ QUOTENAME(TABLE_NAME))
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE
= 'BASE TABLE'
AND
QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
> @TableName
AND OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
), 'IsMSShipped'
) = 0
)
WHILE (@TableName IS NOT NULL) AND (@ColumnName IS
NOT NULL)
BEGIN
SET @ColumnName =
(
SELECT
MIN(QUOTENAME(COLUMN_NAME))
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_SCHEMA = PARSENAME(@TableName, 2)
AND
TABLE_NAME = PARSENAME(@TableName, 1)
AND
DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
AND
QUOTENAME(COLUMN_NAME)
> @ColumnName
)
IF @ColumnName IS NOT NULL
BEGIN
INSERT INTO #Results
EXEC
(
'SELECT ''' +
@TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)
FROM ' +
@TableName + ' (NOLOCK) ' +
' WHERE ' +
@ColumnName + ' LIKE ' + @SearchStr2
)
END
END
END
SELECT ColumnName, ColumnValue FROM #Results
END
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Monday, January 25, 2016 12:00 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Delete not allowed. Referenced by at least one Customer
Hello again!
Another question that I've stumbled into. I'm trying to set up Work Force personnel for quoting. When we started the implementation of quoting, we had a default used, and set the ID as "default".
Now, when I try to delete it, it comes up with the error: "Delete not allowed. Referenced by at least one Customer". I've tried tracing it back to everything I imagine it could have been used for - but it's not being used anywhere.
Places I've checked include:
- Opportunity / Quote
- Sales Orders (No current sales orders)
- Customer Setup
Please note we've only set up Work Force entries for quoting, which is the extent to which we've visited CRM.
Is there any blatantly obvious place I'm missing a record link that is holding up this Work Force entry being deleted?
Kind regards,
Dave.
CONFIDENTIALITY NOTICE
The information contained in this communication, including attachments, is privileged and confidential. It is intended only for the exclusive use of the addressee. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at 727-578-6240 and immediately delete the communication.
"This (document/presentation) may contain technical data as defined in the International Traffic In Arms Regulations (ITAR) 22 CFR 120.10. Export of this material is restricted by the Arms Export Control Act (22 U.S.C. 2751 et seq.) and may not be exported to foreign persons without prior approval form the U.S. Department of State."
Check inactive customers, suspects and prospects
This message has been scanned for malware by Websense. www.websense.com