uBAQ to update PartCOPart not updating

The ERP Analyzer program found an issue where the PartCOPart.PartDescription does not match Part.PartDescription. This was found in preparation for an update from 10.1.400 to 10.2.300

To fix this, I created a uBAQ with PartCOPart.PartDescription being updatable. But the updates don’t seem to take. I’ve only done a couple of uBAQs, so there’s a chance I missed something there.

But before I start digging, I wanted to make sure PartCOPart is actually updatable.

Are there any tables that aren’t updatable?

As a backup, would it be possible to update PartCOPart.PartDescription via a DMT? And if so, which “BO” (Part, Part Revision, Part Combined, …) ??

FWIW - the DataDict entry for PartCOPart table is:

Contains the list of companion Part Numbers which are built along with the Primary part.
Child of PartRev

Seems that PartCOPart.PartDescription cannot be changed directly via a uBAQ. I get the following error (which I overlooked before)

Severity: Exception, Table: PartCOPart, Field: , RowID: 03e4dca6-6462-4bea-941e-1600b37a8840, Text: Unable to add Co-Parts. Use Engineering Workbench instead.

Hi, do you have advance production license?

No we do not.

I think there is a data fix from epicor.

I’ve had a support ticket open for 11 days now …

Do you have anything I can reference for the datafix? Maybe if I tell support exactly what they need to do, they’ll actually do it.

Here is how I would approach this. I took one of my standard updates and changed to PartCOPart. Obviously test first and remove the PartCOPart.PartNum is not null condition. You should be able to clear or type anything in the bad copart partdescription and the update will fix it.

update_copart.baq (33.1 KB)

/* update PartCOPart */
Erp.Tables.PartCOPart PartCOPart;
foreach (var ttResults_iterator in (from ttResults_Row in ttResults
                                    where !ttResults_Row.Unchanged()
                                    select ttResults_Row))
{
    var ttResultsRow = ttResults_iterator;
    PartCOPart = (from PartCOPart_Row in Db.PartCOPart
               where PartCOPart_Row.Company == Session.CompanyID && PartCOPart_Row.SysRowID == ttResultsRow.PartCOPart_SysRowID
               select PartCOPart_Row).FirstOrDefault();
    if (PartCOPart != null)
    {
        PartCOPart.PartDescription = ttResultsRow.Part_PartDescription;
       
    }
}

Thanks!!!

I’ll give this a try tonight. Obviously on our Test DB first. :slight_smile:

Can’t use that BAQ as I’m still on 10.1.400 :frowning:

Maybe I’ll try to reconstruct it

You just need part and part description from both tables and sysrowid then paste the code in the update