Forum Discussion

M_kaneda's avatar
M_kaneda
Creator I
6 years ago

Error: Method "CE_LinkManufacturer" failed

Hello, Dear

<Version 12.0 Build 13341>

Regarding add maker information, cannot add data of "CE Manufacturer name "

Detected Error:  Method "CE_LinkManufacturer" failed.

technical message aras_object "undefined ": "Not a single item

I suspect SQL database table have something issue.

And I cannot find table  for CE_LinkManufacturer.

Though I imported Aras component Engineering "12.0R1", No failure was occurred at that time.

Would you please let me know any suggestion?

Sincerely

15 Replies

  • Hi

    CE_LinkManufacturer is a method and not a table in SQL db. Corresponding database table are CE_CLOUDMANUFACTURER. This is error is so generic. It denotes query return multiple records and method expecting one item. Can you please debug this method CE_LinkManufacturer and check ?

    Thank You

    Gopikrishnan R

  • Hi,

    I remember that I also got a "Not a single item" error while doing something similar during my first CE tests. 

    In my case I had an Manufacturer with an outdated lifecycle. The corresponding items a state that wasn´t present in the latest lifecycle anymore. Do you have ever changed the lifecycle of your Manufacturer? If yes, you have to check if all your Manufacturer still use the correct lifecycle. 

    But beware on any debugging you do here! I was debugging the error by myself as I didn´t got any response from Aras support. After I proudly found the missing piece, I got a phone call from a not amused Aras product manager a few minutes later as I accidentally created a lot of requests to the IHS database.

  • Hi AngelaIp,
    Hi Gopikrishnan,

    Thank you for your advice.

    I'll check and try to Manufacturer first.

  • Maybe the solution is more simple. In your screenshot you tried to start the sync from a new created part. Do you get the same error message when you try to sync an existing part?

    • M_kaneda's avatar
      M_kaneda
      Creator I

      Hi AngelaIp, 

      Hi Gopikrishnan,

      I tried the case which your advice.

      1.If I try to make a new parts, disable to add the data without choosing the manufacturer of pull down menu.

      2. I found some warning in method  CE_LinkManufacturer source.

      I'll upload source code of CE_LinkManufacturer  next reply

      • M_kaneda's avatar
        M_kaneda
        Creator I

        I found warning mark Line 77,88 and 123.

        looks these line grammar is incorrect.. but I'm not professional of Java script.

        I'm checking them now.

        --------------------<below is CE_LinkManufacturer  code>---------

        //Get settings for 'Manufacturer'
        var formattedSettingsItm = new Item('ItemType', 'CE_GetFormattedSettings');
        formattedSettingsItm.setProperty('cloud_itemtype', 'Manufacturer');
        formattedSettingsItm = formattedSettingsItm.apply();

        if (formattedSettingsItm.isError())
        {
        top.aras.AlertError('Unable to get formatted settings for "Manufacturer" cloud type: ' + formattedSettingsItm.getErrorString());
        return;
        }

        var propertyMappingItm = formattedSettingsItm.getItemsByXPath('Relationships/Item[@type="Property Mapping"]');

        var manufacturerItemTypeName = formattedSettingsItm.getPropertyAttribute('local_itemtype', 'name');
        var manufacturerCeObjectIdPropertyName = propertyMappingItm.getPropertyAttribute('ce_object_id', 'name');
        var manufacturerCeSourcePropertyName = propertyMappingItm.getPropertyAttribute('ce_source', 'name');
        var manufacturerCeSyncDatePropertyName = propertyMappingItm.getPropertyAttribute('ce_sync_date', 'name');
        var manufacturerManufacturerNamePropertyName = propertyMappingItm.getPropertyAttribute('mfr_name_1', 'name');
        var manufacturerCeManufacturerNamePropertyName = propertyMappingItm.getPropertyAttribute('mfr_name_2', 'name');

        var isMainGrid = (typeof(parent.itemTypeName) === 'undefined');
        var aWindow = top.aras.getMostTopWindowWithAras(window);

        if (aras.commonProperties && aras.commonProperties.SearchCountModeException) {
        aras.commonProperties.SearchCountModeException.push('03278E95AFE34B7EA0B352EAA85AE021');
        }
        var args = {
        aras: aras,
        type: 'SearchDialog',
        dialogWidth: 700,
        dialogHeight: 450,
        itemtypeName: 'CE_CloudManufacturer'
        };
        var dialog = (aWindow.main || aWindow).ArasModules.MaximazableDialog.show('iframe', args);
        dialog.promise.then(callback);

        //Add 'gridLinkClick' event handler
        var intervalId = setInterval(function() {
        try
        {
        var contentWindow = dialog.dialogNode.childNodes[1].childNodes[0].contentWindow;
        var grid = contentWindow.grid || contentWindow.gridApplet;

        if ((typeof(grid) !== 'undefined') && (grid !== null))
        {
        clearInterval(intervalId);
        dojo.connect(grid, 'gridLinkClick', onGridLinkClickEventHandler);
        }
        }
        catch(e)
        {
        }
        }, 300);

        function callback(res)
        {
        if (aras.commonProperties && aras.commonProperties.SearchCountModeException) {
        aras.commonProperties.SearchCountModeException.pop();
        }
        if (isNullOrUndefined(res)) {
        return;
        }
        var item = res.item;
        if (!isNullOrUndefined(item))
        {
        //Get item from cache or from server
        var manufacturerId = aras.getVariable('CE_CurrentItemId', '');
        var manufacturerItm = aras.getItemById(manufacturerItemTypeName, manufacturerId, 0);

        if (!isNullOrUndefined(manufacturerItm))
        {
        var objectId = top.aras.getItemProperty(manufacturerItm, manufacturerCeObjectIdPropertyName, '');

        if (objectId !== '')
        {
        var res = top.aras.confirm(manufacturerItemTypeName + ' is already linked. Are you sure you want to overwrite the link?');
        if (!res) {
        return;
        }
        }

        var localManufacturerName = top.aras.getItemProperty(manufacturerItm, manufacturerManufacturerNamePropertyName, '');
        var cloudManufacturerObjectId = top.aras.getItemProperty(item, 'mfr_object_id', '');
        var cloudManufacturerName = top.aras.getItemProperty(item, 'mfr_name', '');
        var cloudCeSource = '1';

        top.aras.setItemProperty(manufacturerItm, manufacturerCeObjectIdPropertyName, cloudManufacturerObjectId);
        if (localManufacturerName == '')
        {
        top.aras.setItemProperty(manufacturerItm, manufacturerManufacturerNamePropertyName, cloudManufacturerName);
        }
        top.aras.setItemProperty(manufacturerItm, manufacturerCeManufacturerNamePropertyName, cloudManufacturerName);
        top.aras.setItemProperty(manufacturerItm, manufacturerCeSourcePropertyName, cloudCeSource);
        top.aras.setItemProperty(manufacturerItm, manufacturerCeSyncDatePropertyName, '');

        if (!isMainGrid)
        {
        //Update form
        aras.RefillWindow(parent.item, parent, true);
        } else {
        //Update MainGrid
        aWindow.main.work.searchContainer.runSearch();
        }
        }
        }
        }

        function onGridLinkClickEventHandler(str)
        {
        try
        {
        var link = (str.split(',')[1]).replace(/'/g, '');
        window.open(link, '_blank');
        }
        catch(e)
        {
        return;
        }
        }

        function isNullOrUndefined(param)
        {
        return ((typeof(param) === 'undefined') || (param == null));
        }

  • Hi,

    sorry I somehow lost track of this thread. What do you currently try to achieve? Where you able to link your Manufacturer? Maybe you could provide some steps to reproduce.
    You shouldn´t need to customize the CE_LinkManufacturer Method. Do you have already asked Aras support about this issue?

    Be really careful about any changes you do in CE! The CE code is insufficiently secured and mistakes can happen too easy. Unfortunately, Aras did not spend any energy so far to make the code more fail save. Be careful not to end up as a scapegoat for their development fails!

    • M_kaneda's avatar
      M_kaneda
      Creator I

      Hi ,

      Thank you for your advice.

      fortunately I've just checked  CE_LinkManufacturer Method only, I don't change any parameter.

      Regarding the manufacturer record, I cannot add  Manufacturer name in other menu.

      And Manufacturer name looks link to the cloud Manufacturer... ?

      But I'm not sure I cannot access Cloud Manufacturer from sourcing menu.

      Anyway, error dialog is indicated client side error.

      It's very curious I can find unknown CE manufacturer name from inquiry dialog.

      But that manufacturer name is invalid data . because I could not add it before.

      I don't know why invalid data is existed in the inquiry.

      I'm thinking whether should re-install aras innovator and SQL server.

      Best Regards!

      • angela's avatar
        angela
        Catalyst II

        Hi, 

        have you looked at the  'Linking Manufacturers' chapter in the CE User Guide?

        Just to be sure:
        - Are you able to add regular Manufacturer items at all? E.g. when you create a new Manufacturer and add the name by your self, can you save this item?

        - Can you do a regular search for CE Parts in Cloud Manufacturer Parts? If this one already makes trouble, you may have some general connection problem with CE. 

        I really recommend you to write an email to Aras support. They are quite good in CE troubleshooting!

  • Anonymous's avatar
    Anonymous
    Not applicable

    • Buy original Drivers license ,Passport,ielts certificates, Whatsapp ---- +1(929) 460-1873

    ID card, IELTS,visa, birth certificate, school diplomas,marriage certificate,US Green card (((https:// globallyconsultings.com)))and many other documents.
    • Contact us: ((( [email protected]
    )))
    Website……….globallyconsultings.com/
    Apply for real and register Passport, Visa, Driving License,ID CARDS,marriage certificates,diplomas etc. for sell. Passport,citizenship,ID cards,driver