Skip to content

Conversation

@sf-kishore-kurri
Copy link
Contributor

Changes:

  • Hanlded the error case for DM data migration issues
  • IP having custom formula causing the JSON parse issue
  • Hanlde of LWC component with nested namespace tags

What does this PR do?

What issues does this PR fix or reference?

@sf-kishore-kurri sf-kishore-kurri requested a review from a team as a code owner September 15, 2025 14:02
Changes:
- Hanlded the error case for DM data migration issues
- IP having custom formula causing the JSON parse issue
- Hanlde of LWC component with nested namespace tags
} else {
// Handle failed migration - add error information
if (!drUploadResponse) {
if (!drUploadResponse?.success) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing the undefined check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren't removing, we are checking the success status and logging error for failure case

Logger.warn(
this.messages.getMessage('elementValueMapUnexpectedType', [
typeof propertySet.elementValueMap,
ipElement['Name'] || 'Unknown',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the code not return from here, if the elementValueMap is of unexpectedType?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If elementValueType is undefined then we don't update the config and move on with existing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this condition is false
typeof propertySet.elementValueMap === 'object') still the line 847 will be hit
I meant elementValueMapUnexpectedType.

formulasUpdated = true;
Logger.logVerbose(`Updated formula in ${key}: ${value} -> ${updatedFormula}`);
}
} catch (formulaEx) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of exception/ failure to update the formula, how will the same be reflected in the report, if we are catching the exceptions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When update formula function fails, we are logging error and verbose message for debugging and managed package runtime will do the formula migration again post migration so we should be good

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the managed package will do it and we are sure, then why are we duplicating the logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the existing logic with OMT tool

@snehaljha-sf snehaljha-sf merged commit e0978be into salesforcecli:prerelease/develop-ga Sep 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants