UOM has on hand Inventory. It can not be set as Inactive

I created a new Class, added some UOMs and have only 1 EA Transaction, GAL’s is not USED Anywhere, why can’t I delete it… Is Epicor NOT Accounting for the ClassID and assumes that because I am using GAL’s via “Volume” I cant delete it from another Class which was made 5 min ago… ?

I just created this 10 seconds ago lol… .havent even used it, if you make a mistake you are screwed eh? :slight_smile: no wonder people use SQL :smiley: and Epicor has to put in its terms that your warranty is void, what choice do they have? :smiley: fix your bugs!

2 Likes

FWIW - I seem to recall having similar issues.

You double checked that the part with QOH is not in this Class?

What if you open UOM Class maint with only “Other OZ to EA” loaded? It’s a stretch, but may having class “Volume measurements” loaded too is causing an issue.

Same I just created a new one, just loaded that one - same Error… It’s Query is not accounting for the Class ID, just the UOM which I get because not everywhere is Class ID carried thru…

I would assume I am safe to use SQL and delete it:

Can you now delete the class “test”? Or does it balk because some of the conversions are “in use” - even though no part is of class “test”

It only accounts for UOM when doing its look-up, prob an Epicor Bug.

Yeah… Seems like it thinks you’re trying to delete the UOM, instead of removing it from the Class.

1 Like

Hmmm … I just did the following:

  1. Created a class “test”
  2. Added UOM EA as the primary
  3. Added UOM FT as a secondary (1 EA = 1 FT, and is Active).
  4. Closed UOM Class Maint.
  5. Opened UOM Class Maint
  6. Deleted UOM converiosn FT from class test - with no problem.

Edit: highlighted the fact that the conversion being deleted was left active.

I think the conversion cannot be made inactive when QOH exists for parts using that UOM, regardless of the Class.

I think you want to leave it active and just delete it.

Weird, I can delete CUFT, I can delete ML, L – but not GAL and FT… from a test Class… We are on 10.1.500.31

There is no Delete button unless you Inactivate it. So I blew it out via SQL for that Class.

i also double checked UOM, Part’s… All look good, nothing affected.

We’re on 10.1.400.23.

I assume that you’ve never used that class (“Test”) you just made. so no parts or trans could have ever used it.

My guess is that Epicor added the requirement of making a conversion in active, before deleting it.

Which scares me when I think that there must be some reason for that, and that my 10.4.100 allows it.

Whoa … If I select the UOM conversion in the list view, the delete button is enabled.

image

When I switch to the Details view the delete button is disabled:
image

1 Like

I guess maybe I was wrong, it must be related to the On-Hand bug:
2018-12-03_1106

I can delete if its not in-use.

The thing is, I made a test class and added a UOM I know to be in use. And was then able to delete it from the class.

Have you ever done a Part UOM Conversion? I did that with this class, but the part had only 2 UOMs’ EA and OZ… Gallons no where… I had to put in all the Volume UOMs into my Target Class “Temporarily” for the Conversion to happen, once 2 Parts were converted, the idea was that I would go and Delete then those ones I don’t need on the Target UOM Class

I dont understand why GAL would be grayed out.

I even ran a Global SQL Search for that ClassID and Part to make sure I wasn’t deleting something which was being references somewhere… looks good to me:

I guess if your Class is used on 1 Part then the UOM’s on it are treated as “Does any record exist for the UOM, forget the Class, if so, gray out!” Because CUFT is enabled, i can change the multiplier etc… because its not used yet.

I’ve done lots of UOM conversions.

And looking at my system I know see I have the same exact problem as you.

A bunch of parts were created as COUNT.EA, when they should have been LENGTH.FT.

So I created a class CNT-OTH to make those parts be in FT. After doing the conversion, I now have no parts of CNT-OTH.EA

But cannot mark that conversion as inactive.
image

I wonder if a uBAQ could get around it. I was able to clear the Valid setting on Report Styles (in order to hide them) via a uBAQ. The program itself would allow you to clear it, but upon saving, it would just be set again.

1 Like

Yesss!! Thats what I am after lol I deleted it now UDB

But here I am making sure I am not messing up some special “Referential Tables” and thus far doing a Global Search, It looks like just a Bug in the UOM Conversion Maintenance.

Just making sure I am not breaking some link and it used the “GAL” in some background tables, but thus far no sign of GAL :slight_smile: So with that I think it was safe to manually delete them.

Did you check if that part and UOM was referenced on Orders too? I had to do a “tweak” in SQL to fix a few orders that had a part, whose class ID dd NOT include the UOM specified on the order. But I think these happend because it was an On The Fly part first (when entered on the order), and later added to the Part master.

Yup all it found was:

/* Reto Egeter, fullparam.wordpress.com */

DECLARE @SearchStrTableName nvarchar(255), @SearchStrColumnName nvarchar(255), @SearchStrColumnValue nvarchar(255), @SearchStrInXML bit, @FullRowResult bit, @FullRowResultRows int
SET @SearchStrColumnValue = '%OtherOZ-EA%' /* use LIKE syntax */
SET @FullRowResult = 1
SET @FullRowResultRows = 3
SET @SearchStrTableName = NULL /* NULL for all tables, uses LIKE syntax */
SET @SearchStrColumnName = NULL /* NULL for all columns, uses LIKE syntax */
SET @SearchStrInXML = 0 /* Searching XML data may be slow */

IF OBJECT_ID('tempdb..#Results') IS NOT NULL DROP TABLE #Results
CREATE TABLE #Results (TableName nvarchar(128), ColumnName nvarchar(128), ColumnValue nvarchar(max),ColumnType nvarchar(20))

SET NOCOUNT ON

DECLARE @TableName nvarchar(256) = '',@ColumnName nvarchar(128),@ColumnType nvarchar(20), @QuotedSearchStrColumnValue nvarchar(110), @QuotedSearchStrColumnName nvarchar(110)
SET @QuotedSearchStrColumnValue = QUOTENAME(@SearchStrColumnValue,'''')
DECLARE @ColumnNameTable TABLE (COLUMN_NAME nvarchar(128),DATA_TYPE nvarchar(20))

WHILE @TableName IS NOT NULL
BEGIN
    SET @TableName = 
    (
        SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
        FROM    INFORMATION_SCHEMA.TABLES
        WHERE       TABLE_TYPE = 'BASE TABLE'
            AND TABLE_NAME LIKE COALESCE(@SearchStrTableName,TABLE_NAME)
            AND QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
            AND OBJECTPROPERTY(OBJECT_ID(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)), 'IsMSShipped') = 0
    )
    IF @TableName IS NOT NULL
    BEGIN
        DECLARE @sql VARCHAR(MAX)
        SET @sql = 'SELECT QUOTENAME(COLUMN_NAME),DATA_TYPE
                FROM    INFORMATION_SCHEMA.COLUMNS
                WHERE       TABLE_SCHEMA    = PARSENAME(''' + @TableName + ''', 2)
                AND TABLE_NAME  = PARSENAME(''' + @TableName + ''', 1)
                AND DATA_TYPE IN (' + CASE WHEN ISNUMERIC(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(@SearchStrColumnValue,'%',''),'_',''),'[',''),']',''),'-','')) = 1 THEN '''tinyint'',''int'',''smallint'',''bigint'',''numeric'',''decimal'',''smallmoney'',''money'',' ELSE '' END + '''char'',''varchar'',''nchar'',''nvarchar'',''timestamp'',''uniqueidentifier''' + CASE @SearchStrInXML WHEN 1 THEN ',''xml''' ELSE '' END + ')
                AND COLUMN_NAME LIKE COALESCE(' + CASE WHEN @SearchStrColumnName IS NULL THEN 'NULL' ELSE '''' + @SearchStrColumnName + '''' END  + ',COLUMN_NAME)'
        INSERT INTO @ColumnNameTable
        EXEC (@sql)
        WHILE EXISTS (SELECT TOP 1 COLUMN_NAME FROM @ColumnNameTable)
        BEGIN
            PRINT @ColumnName
            SELECT TOP 1 @ColumnName = COLUMN_NAME,@ColumnType = DATA_TYPE FROM @ColumnNameTable
            SET @sql = 'SELECT ''' + @TableName + ''',''' + @ColumnName + ''',' + CASE @ColumnType WHEN 'xml' THEN 'LEFT(CAST(' + @ColumnName + ' AS nvarchar(MAX)), 4096),''' 
            WHEN 'timestamp' THEN 'master.dbo.fn_varbintohexstr('+ @ColumnName + '),'''
            ELSE 'LEFT(' + @ColumnName + ', 4096),''' END + @ColumnType + ''' 
                    FROM ' + @TableName + ' (NOLOCK) ' +
                    ' WHERE ' + CASE @ColumnType WHEN 'xml' THEN 'CAST(' + @ColumnName + ' AS nvarchar(MAX))' 
                    WHEN 'timestamp' THEN 'master.dbo.fn_varbintohexstr('+ @ColumnName + ')'
                    ELSE @ColumnName END + ' LIKE ' + @QuotedSearchStrColumnValue
            INSERT INTO #Results
            EXEC(@sql)
            IF @@ROWCOUNT > 0 IF @FullRowResult = 1 
            BEGIN
                SET @sql = 'SELECT TOP ' + CAST(@FullRowResultRows AS VARCHAR(3)) + ' ''' + @TableName + ''' AS [TableFound],''' + @ColumnName + ''' AS [ColumnFound],''FullRow>'' AS [FullRow>],*' +
                    ' FROM ' + @TableName + ' (NOLOCK) ' +
                    ' WHERE ' + CASE @ColumnType WHEN 'xml' THEN 'CAST(' + @ColumnName + ' AS nvarchar(MAX))' 
                    WHEN 'timestamp' THEN 'master.dbo.fn_varbintohexstr('+ @ColumnName + ')'
                    ELSE @ColumnName END + ' LIKE ' + @QuotedSearchStrColumnValue
                EXEC(@sql)
            END
            DELETE FROM @ColumnNameTable WHERE COLUMN_NAME = @ColumnName
        END 
    END
END
SET NOCOUNT OFF

SELECT TableName, ColumnName, ColumnValue, ColumnType, COUNT(*) AS Count FROM #Results
GROUP BY TableName, ColumnName, ColumnValue, ColumnType

2018-12-03_1134
All those tables reference is EA to OZ.

Just tested a uBAQ, and its a no-go.