-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import support for custom metadata #238
Import support for custom metadata #238
Conversation
…ustom metadata from the data export Delete Records button
Wow @toly11 🤯 |
I'm wondering if we need to display API Type to users, maybe we can just leave it as it was and automatically select metadata when the sobject ends with __mdt ? |
{ value: "create", label: "Insert", supportedApis: ["Enterprise", "Tooling"] }, | ||
{ value: "update", label: "Update", supportedApis: ["Enterprise", "Tooling"] }, | ||
{ value: "upsert", label: "Upsert", supportedApis: ["Enterprise", "Tooling"] }, | ||
{ value: "delete", label: "Delete", supportedApis: ["Enterprise", "Tooling"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also add the new option "undelete" I've added yesterday
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I think about this again, Isn't undelete supported in Enterprise API only?
If so, I will remove Tooling from the supportedApis attribute
You're onto something with the idea of auto-selecting Metadata API for __mdt objects behind the scenes, I initially went down that path, as seen in my first commit. However, I realized separating API types makes development and future updates smoother. Here's why: Action Limitations: With Metadata, we only have upsert and delete options. This differs from the other APIs. Primary Key Differences: For custom metadata, "DeveloperName" is always the key, unlike "Id" or external IDs in other cases. This simplifies the code for the field mapping logic. Future Feature Integration: Planning ahead, we might want to show the Metadata option only if users have the required permissions (like 'Customize Application'). Support for additional APIs In the future we might want to add additional APIs, this will be easier with this architecture. Terminology: Also, we've moved beyond a simple Tooling vs. non-Tooling binary. Now, with Enterprise, Tooling, and Metadata as distinct APIs, it's more accurate and clearer to maintain this division in terms. This approach might complicate the UI slightly, but it's a trade-off for clearer, more maintainable code and functionality. |
Yes, please see my comment on that message |
@tprouvot |
I agree with you, it is cleaner to have a dedicated field for this, I was just worried that some users select this option without knowing what they are doing and create issue after that 😄 |
I see what you mean. Good point On the other hand |
My point was that the MasterLabel is more like a required field than a primary key. And currently, Inspector doesn't validate the existence of required fields in insert operations (like the Contact LastName which is required, and the insert button is clickable even if a LastName column wasn't provided). But on the other hand, the user could technically have an automation that populates the required fields automatically, but custom metadata types do not support automation. So if it's missing it will indeed fail So, I think it's a good idea. And I will try to implement it. |
Great ! Thanks for those updates 🙏 |
I have resolved the conflicts |
Looking forward for everyone to enjoy this new feature! 🤩 @tprouvot, when do you think the next version will come out? |
@toly11 Initially I wanted to release it on January but I think that we may have enough new features to release it before. I created a new extension today on chrome web store to allow users (with extension link) to test the BETA version which correspond to the releaseCandidate branch, I'm thinking of releasing the beta version for a moment (maybe a month) and after this period for all users. |
I think it's a great idea! I suggest listing it privately, and putting the link to it on this repositories' main page (README.md) |
Overview:
This pull request significantly enhances Inspector's capabilities by introducing support for importing and deleting records of custom metadata types. Previously, Inspector's functionality was primarily confined to interacting with the standard Enterprise API and the Tooling API. This extension did not encompass the Metadata API, which limited its utility for custom metadata operations. The implementation of this feature addresses this gap, expanding Inspector's versatility.
Testing
Extensive testing has been conducted across various environments to ensure this new feature's compatibility and seamless integration with Inspector's existing functionalities. I encourage further testing to validate its efficiency and usability enhancements. Furthermore, I have executed all unit tests in accordance with the guidelines outlined in the contribution guide, making minor modifications to the test script to accommodate the new changes
Documentation
I have documented this change in the CHANGES.md file
Request for Review
I kindly request a review of this pull request and am open to making any necessary adjustments based on your feedback. Thank you for considering this valuable enhancement to the extension's functionality