Retrieving in metadata format instead of source format

27 views
Skip to first unread message

Ryan Baronda

unread,
Oct 5, 2023, 5:17:23 PM10/5/23
to Illuminated Cloud General Discussion
My project was created in source format and is doing well. However, there a times that I need the metadata format. Is there a way I can retrieve from a sandbox and/or convert source format into metadata format using IC2?

Scott Wells

unread,
Oct 5, 2023, 5:23:58 PM10/5/23
to Illuminated Cloud General Discussion, Ryan Baronda
Not in the same project, at least not using IC2 alone...you could certainly use the "force:mdapi"retrieve" CLI command to retrieve things in metadata format. However, you can create a new non-SFDX project against the same connection and metadata will be retrieved in metadata format. Perhaps not quite what you were looking for, but it's a pretty straightforward workaround.

Regards,
Scott Wells

Ryan Baronda

unread,
Oct 5, 2023, 6:22:25 PM10/5/23
to Illuminated Cloud General Discussion, Scott Wells, Ryan Baronda
Hi Scott,

Thanks for the response. I tried creating a non-sfdx project but I'm still getting the source format on the report metadata. Can you refer me to the steps on how to do this with IC2?

Regards,

Ryan Baronda

Scott Wells

unread,
Oct 5, 2023, 6:25:30 PM10/5/23
to Illuminated Cloud General Discussion, Ryan Baronda, Scott Wells
If you create a project using this generator it will be metadata format:

Create_Metadata_Format_Project.png

Just choose the same connection you use for your source format project, and when it gets retrieved, it'll be in metadata format as IC2 will use the API directly instead of the CLI (which is responsible for the native metadata format-to-source format conversion).

Regards,
Scott Wells

Scott Wells

unread,
Oct 5, 2023, 6:32:47 PM10/5/23
to Illuminated Cloud General Discussion, Scott Wells, Ryan Baronda
If you're doing that and it's still retrieving reports in source format...well...that's confusing, for sure. The Metadata API should only be retrieving files in raw metadata format. It has no knowledge of source format. That's a "decoration" applied by the CLI's "source" commands. If you're seeing that behavior, please enable debug logging for metadata retrieval, reproduce it, and send over your idea.log (Help | Show Log in Explorer/Finder/Files) for review. You can email it to sup...@illuminatedcloud.com.

Regards,
Scott Wells

Ryan Baronda

unread,
Oct 5, 2023, 6:47:13 PM10/5/23
to Illuminated Cloud General Discussion, Scott Wells, Ryan Baronda
Hi Scott,

Thanks for the info. I will try again and send the logs later.

Best regards,

Ryan Baronda

Reply all
Reply to author
Forward
0 new messages