# How-to-fix-Dev2Prod-failure_688988351 ## Symptom If you have created two identical custom actions for the same record type in both source and target tenants, the Dev2Prod process fails. The error messages are as follows: ``` > Customization1 Metadata element .CustomActionName_c.Localized Label Key is invalid. > Update of existing element descriptor's attributes is not available through customization. Refer to: Customization1. > > Customization1 Metadata element .CustomActionName_c.Tooltip Localized Label Key is invalid. Update of existing element descriptor's attributes is not available through customization. Refer to: Customization1. > > Customization1 Metadata element .CustomActionName_c.Placeholder Localized Label Key is invalid. > Update of existing element descriptor's attributes is not available through customization. Refer to: Customization1. > > Customization1 Metadata element EntityType.CustomActionCount_c.Localized Label Key is invalid. > Update of existing element descriptor's attributes is not available through customization. Refer to: Customization1. > > Customization1 Metadata element .CustomActionCount_c.Tooltip Localized Label Key is invalid. > Update of existing element descriptor's attributes is not available through customization. Refer to: Customization1. > > Customization1 Metadata element EntityType.CustomActionCount_c.Placeholder Localized Label Key is invalid. > Update of existing element descriptor's attributes is not available through customization. Refer to: Customization1. ``` ## Resolution This resolution applies to SMAX versions from 2023.05 to 24.1. **Note:** For example, the verion number is \*\*\\\*\*, export from \*\*\\\*\* and import into \*\*\\\*\*, the related entities are \*\*\\\*\* and \*\*\\\*\*. Step 1. Choose \*\*xservices-ems\*\*, execute the following queries on both and , and keep the results for later steps. Step 1.1. Run the following command: ``` \`\`\`SQL SELECT ed.tenant_id AS "version", pd.tenant_id, pd.parent_descriptor_id AS entity_type_id, ed."name" AS entity_name, pd."name" AS field_name, pd.localization_key, ed."name" || '.' || pd."name" || '.localized-label-key' as localization_key_new FROM property_descriptor pd LEFT JOIN entity_descriptor ed ON pd.parent_descriptor_id = ed.id WHERE pd."name" IN ('CustomActionName_c', 'CustomActionCount_c') AND ed.tenant_id = '' AND pd.tenant_id IN ('', '') AND ed."name" IN ('', ''); \`\`\` ``` For example, in the following case, \\ is "v26", is "100000001", is "100000002", is "Request", is "Incident". The script would be: ``` \`\`\`SQL SELECT ed.tenant_id AS "version", pd.tenant_id, pd.parent_descriptor_id AS entity_type_id, ed."name" AS entity_name, pd."name" AS field_name, pd.localization_key, ed."name" || '.' || pd."name" || '.localized-label-key' as localization_key_new FROM property_descriptor pd LEFT JOIN entity_descriptor ed ON pd.parent_descriptor_id = ed.id WHERE pd."name" IN ('CustomActionName_c', 'CustomActionCount_c') AND ed.tenant_id = 'v26' AND pd.tenant_id IN ('100000001', '100000002') AND ed."name" IN ('Request', 'Incident'); \`\`\` ``` The output would be: ``` table1 | version | tenant_id | entity_type_id | entity_name | field_name | localization_key | localization_key_new | | ------- | --------- | -------------- | ----------- | ------------------- | ----------------------------------- | ------------------------------------------------ | | v26 | 100000001 | 247 | Incident | CustomActionCount_c | CustomActionCount_c_1710482969177_c | Incident.CustomActionCount_c.localized-label-key | | v26 | 100000001 | 247 | Incident | CustomActionName_c | CustomActionName_c_1710482969053_c | Incident.CustomActionName_c.localized-label-key | | v26 | 100000001 | 375 | Request | CustomActionCount_c | CustomActionCount_c_1710482749123_c | Request.CustomActionCount_c.localized-label-key | | v26 | 100000001 | 375 | Request | CustomActionName_c | CustomActionName_c_1710482749001_c | Request.CustomActionName_c.localized-label-key | | v26 | 100000002 | 247 | Incident | CustomActionCount_c | CustomActionCount_c_1710482925908_c | Incident.CustomActionCount_c.localized-label-key | | v26 | 100000002 | 247 | Incident | CustomActionName_c | CustomActionName_c_1710482925779_c | Incident.CustomActionName_c.localized-label-key | | v26 | 100000002 | 375 | Request | CustomActionCount_c | CustomActionCount_c_1710482721555_c | Request.CustomActionCount_c.localized-label-key | | v26 | 100000002 | 375 | Request | CustomActionName_c | CustomActionName_c_1710482721392_c | Request.CustomActionName_c.localized-label-key | ``` Step 1.2. Run the following command: ``` \`\`\`SQL SELECT tenant_id, property_descriptor_name, entity_descriptor_name, placeholder_key, entity_descriptor_name || '.' || property_descriptor_name || '.placeholder' AS placeholder_key_new, tooltip_key, entity_descriptor_name || '.' || property_descriptor_name || '.tooltip' AS tooltip_key_new FROM property_descriptor_ui WHERE property_descriptor_name IN ('CustomActionName_c', 'CustomActionCount_c') AND tenant_id IN ('', '') AND entity_descriptor_name IN ('', ''); \`\`\` ``` In our case, the script would be: ``` \`\`\`SQL SELECT tenant_id, property_descriptor_name, entity_descriptor_name, placeholder_key, entity_descriptor_name || '.' || property_descriptor_name || '.placeholder' AS placeholder_key_new, tooltip_key, entity_descriptor_name || '.' || property_descriptor_name || '.tooltip' AS tooltip_key_new FROM property_descriptor_ui WHERE property_descriptor_name IN ('CustomActionName_c', 'CustomActionCount_c') AND tenant_id IN ('100000001', '100000002') AND entity_descriptor_name IN ('Request', 'Incident'); \`\`\` table2 | tenant_id | property_descriptor_name | entity_descriptor_name | placeholder_key | placeholder_key_new | tooltip_key | tooltip_key_new | | --------- | ------------------------ | ---------------------- | ----------------------------------------------- | ---------------------------------------- | ------------------------------------------- | ------------------------------------ | | 100000001 | CustomActionCount_c | Incident | CustomActionCount_c_PLACEHOLDER_1710482969177_c | Incident.CustomActionCount_c.placeholder | CustomActionCount_c_TOOLTIP_1710482969177_c | Incident.CustomActionCount_c.tooltip | | 100000001 | CustomActionCount_c | Request | CustomActionCount_c_PLACEHOLDER_1710482749123_c | Request.CustomActionCount_c.placeholder | CustomActionCount_c_TOOLTIP_1710482749123_c | Request.CustomActionCount_c.tooltip | | 100000001 | CustomActionName_c | Incident | CustomActionName_c_PLACEHOLDER_1710482969053_c | Incident.CustomActionName_c.placeholder | CustomActionName_c_TOOLTIP_1710482969053_c | Incident.CustomActionName_c.tooltip | | 100000001 | CustomActionName_c | Request | CustomActionName_c_PLACEHOLDER_1710482749001_c | Request.CustomActionName_c.placeholder | CustomActionName_c_TOOLTIP_1710482749001_c | Request.CustomActionName_c.tooltip | | 100000002 | CustomActionCount_c | Incident | CustomActionCount_c_PLACEHOLDER_1710482925908_c | Incident.CustomActionCount_c.placeholder | CustomActionCount_c_TOOLTIP_1710482925908_c | Incident.CustomActionCount_c.tooltip | | 100000002 | CustomActionCount_c | Request | CustomActionCount_c_PLACEHOLDER_1710482721555_c | Request.CustomActionCount_c.placeholder | CustomActionCount_c_TOOLTIP_1710482721555_c | Request.CustomActionCount_c.tooltip | | 100000002 | CustomActionName_c | Incident | CustomActionName_c_PLACEHOLDER_1710482925779_c | Incident.CustomActionName_c.placeholder | CustomActionName_c_TOOLTIP_1710482925779_c | Incident.CustomActionName_c.tooltip | | 100000002 | CustomActionName_c | Request | CustomActionName_c_PLACEHOLDER_1710482721392_c | Request.CustomActionName_c.placeholder | CustomActionName_c_TOOLTIP_1710482721392_c | Request.CustomActionName_c.tooltip | ``` Step 2. Choose \*\*xservices-rms\*\*, update all with , all with and all with both on and based on \*\*"table1"\*\* and \*\*"table2"\*\*. ``` \`\`\`SQL UPDATE "ResourceBundle_" SET body = jsonb_set(body, '{Key}', '""') WHERE body->>'Key' = ''; UPDATE "ResourceBundle_" SET body = jsonb_set(body, '{Key}', '""') WHERE body->>'Key' = ''; UPDATE "ResourceBundle_" SET body = jsonb_set(body, '{Key}', '""') WHERE body->>'Key' = ''; \`\`\` ``` In our case, it would be: ``` \`\`\`SQL UPDATE "ResourceBundle_100000001" SET body = jsonb_set(body, '{Key}', '"Incident.CustomActionCount_c.localized-label-key"') WHERE body->>'Key' = 'CustomActionCount_c_1710482969177_c'; ...... UPDATE "ResourceBundle_100000002" SET body = jsonb_set(body, '{Key}', '"Request.CustomActionName_c.localized-label-key"') WHERE body->>'Key' = 'CustomActionName_c_1710482721392_c'; UPDATE "ResourceBundle_100000001" SET body = jsonb_set(body, '{Key}', '"Incident.CustomActionCount_c.placeholder"') WHERE body->>'Key' = 'CustomActionCount_c_PLACEHOLDER_1710482969177_c'; UPDATE "ResourceBundle_100000001" SET body = jsonb_set(body, '{Key}', '"Incident.CustomActionCount_c.tooltip"') WHERE body->>'Key' = 'CustomActionCount_c_TOOLTIP_1710482969177_c'; ...... UPDATE "ResourceBundle_100000002" SET body = jsonb_set(body, '{Key}', '"Request.CustomActionName_c.placeholder"') WHERE body->>'Key' = 'CustomActionName_c_PLACEHOLDER_1710482721392_c'; UPDATE "ResourceBundle_100000002" SET body = jsonb_set(body, '{Key}', '"Request.CustomActionName_c.tooltip"') WHERE body->>'Key' = 'CustomActionName_c_TOOLTIP_1710482721392_c'; \`\`\` ``` Step 3. Choose \*\*xservices-ems\*\*, execute the following updates on both and . ``` \`\`\`SQL UPDATE property_descriptor pd SET localization_key = ed."name" || '.' || pd."name" || '.localized-label-key', flavors = 'EMS' FROM entity_descriptor ed WHERE pd.parent_descriptor_id = ed.id AND pd."name" IN ('CustomActionCount_c', 'CustomActionName_c') AND ed.tenant_id = '' AND pd.tenant_id IN ('', '') AND ed."name" IN ('', ''); UPDATE property_descriptor_ui SET placeholder_key = entity_descriptor_name || '.' || property_descriptor_name || '.placeholder', tooltip_key = entity_descriptor_name || '.' || property_descriptor_name || '.tooltip' WHERE property_descriptor_name IN ('CustomActionCount_c', 'CustomActionName_c') AND tenant_id IN ('', '') AND entity_descriptor_name IN ('', ''); \`\`\` ``` In our case, it would be: ``` \`\`\`SQL UPDATE property_descriptor pd SET localization_key = ed."name" || '.' || pd."name" || '.localized-label-key', flavors = 'EMS' FROM entity_descriptor ed WHERE pd.parent_descriptor_id = ed.id AND pd."name" IN ('CustomActionCount_c', 'CustomActionName_c') AND ed.tenant_id = 'v26' AND pd.tenant_id IN ('100000001', '100000002') AND ed."name" IN ('Request', 'Incident'); UPDATE property_descriptor_ui SET placeholder_key = entity_descriptor_name || '.' || property_descriptor_name || '.placeholder', tooltip_key = entity_descriptor_name || '.' || property_descriptor_name || '.tooltip' WHERE property_descriptor_name IN ('CustomActionCount_c', 'CustomActionName_c') AND tenant_id IN ('100000001', '100000002') AND entity_descriptor_name IN ('Request', 'Incident'); \`\`\` ``` Step 4. It is recommended to restart the platform where the modified tenant is located: ``` \`\`\`sh kubectl rollout restart deployment itom-xruntime-platform -n itsma-xxxxx \`\`\` ``` Step 5. Redo the export and import operations.