PE_AddChangeItem Failed

オフライン

Hello,

I tried to add item(s) to change and got the below noted message:

The method "PE_AddChangeItem" failed.

Technical:
aras_object: "-2147467259" : "Expected token ']' found '
Message:
NUMBER'. /Innovator/Items/Item[@type="ECN"][keyed_name="ECN-0116405 Add 30" -->234.51<--ppf CS components to system"]"
Stack:
Trace Client Side Error
I'm not sure what would casue this error to show up. I noticed that if my ECN title include " character, i always get this error. On the other hand if i take out " character then I can add part into ECN without any issue. I queryed the ECN table and checked the titles and found that we have been used this " character before so I am not convinced that " character would casue this error. I'm wondering if anyone could advise me about this matter.
Title:
Add 30" 234.51ppf CS components to system
Regards,
Jakk
Parents
  • Hello,

    Based on the error it looks like this is caused by the quotation mark appearing in the Title of your ECN, and more specifically because the Title is being used as part of the keyed_name. The keyed_name is generated based one or more other properties based on how the properties are configured on the ItemType. By default, the keyed_name of the ECN ItemType is only set to be generated based on the item_number property. My guess is that there was a relatively recent change to add the title property to the keyed name as well and that the other ECN's you're seeing with quotation marks in their titles were created before this change to the keyed name was made.

    Could you confirm if this change was indeed made and if it was made recently? You can check which properties are currently controlling the keyed name by logging in as an admin, going to the ECN ItemType, and looking to see which properties have values in the Keyed Name Order column. 

    As a resolution to this issue, there's a few possible workarounds. 

    1. Remove the title property from the keyed name
    2. Add checks to ensure that the title property does not contain any special characters like quotation marks
    3. Modify the PE_AddChangeItem method to escape these special characters when they appear

    Solution 1 will be the easiest to implement if there isn't a strong reason to keep the title as part of the keyed name.

    Chris


    Christopher Gillis

    Aras Labs Software Engineer

Reply
  • Hello,

    Based on the error it looks like this is caused by the quotation mark appearing in the Title of your ECN, and more specifically because the Title is being used as part of the keyed_name. The keyed_name is generated based one or more other properties based on how the properties are configured on the ItemType. By default, the keyed_name of the ECN ItemType is only set to be generated based on the item_number property. My guess is that there was a relatively recent change to add the title property to the keyed name as well and that the other ECN's you're seeing with quotation marks in their titles were created before this change to the keyed name was made.

    Could you confirm if this change was indeed made and if it was made recently? You can check which properties are currently controlling the keyed name by logging in as an admin, going to the ECN ItemType, and looking to see which properties have values in the Keyed Name Order column. 

    As a resolution to this issue, there's a few possible workarounds. 

    1. Remove the title property from the keyed name
    2. Add checks to ensure that the title property does not contain any special characters like quotation marks
    3. Modify the PE_AddChangeItem method to escape these special characters when they appear

    Solution 1 will be the easiest to implement if there isn't a strong reason to keep the title as part of the keyed name.

    Chris


    Christopher Gillis

    Aras Labs Software Engineer

Children