Skip to content
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

Feature/1238: find contentblock by id #1239

Merged

Conversation

JoernBerkefeld
Copy link
Contributor

@JoernBerkefeld JoernBerkefeld commented Mar 25, 2024

PR details

What changes did you make? (Give an overview)

Checklist

@JoernBerkefeld JoernBerkefeld added the c/asset COMPONENT label Mar 25, 2024
@JoernBerkefeld JoernBerkefeld added this to the 6.1.0 milestone Mar 25, 2024
@JoernBerkefeld JoernBerkefeld self-assigned this Mar 25, 2024
@JoernBerkefeld JoernBerkefeld linked an issue Mar 25, 2024 that may be closed by this pull request
@github-actions github-actions bot added the enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" label Mar 25, 2024
Copy link

github-actions bot commented Mar 25, 2024

Coverage Report

Commit:3ac6d8f
Base: develop@c2352b1

Type Base This PR
Total Statements Coverage  64.45%  64.57%  (+0.12%)
Total Branches Coverage  66.08%  66.6%  (+0.52%)
Total Functions Coverage  74.09%  74.23%  (+0.14%)
Total Lines Coverage  64.45%  64.57%  (+0.12%)
Details (changed files):
File Statements Branches Functions Lines

@JoernBerkefeld JoernBerkefeld changed the title #1238: find contentblock by id Feature/1238: find contentblock by id Mar 25, 2024
@JoernBerkefeld JoernBerkefeld merged commit 0f22fd8 into develop Mar 25, 2024
6 checks passed
@JoernBerkefeld JoernBerkefeld deleted the feature/1238-get-name-and-key-for-content-block-id branch March 25, 2024 14:11
@JoernBerkefeld JoernBerkefeld mentioned this pull request Mar 25, 2024
10 tasks
@JoernBerkefeld
Copy link
Contributor Author

JoernBerkefeld commented Jun 7, 2024

Documentation

https://github.com/Accenture/sfmc-devtools/wiki/06.a-~-Admin-Commands/_edit

resolveId

Command: mcdev resolveId [business unit] [metadata type] [metadata key]

Alias: mcdev rid

Tries to find the requested asset id and return the key and name as well as info on where it was shared from, if that is the case. This is particularly helpful if you have to deal with code that uses ContentBlockById a lot.

Example:

mcdev rid MyProject/DEV asset 4961
mcdev:: resolveId
 - Searching asset with id 4961 on BU MyProject/DEV
 - ID: 4961
 - Key: 20af5fbf-b4ac-4471-a7e6-2e3d5685c197
 - Name: footer_b2c_transactional
 - How to use:
   %%= ContentBlockByKey("20af5fbf-b4ac-4471-a7e6-2e3d5685c197") =%%
   %%= ContentBlockByName("Content Builder\Release 2 - BUILD\Content Blocks Library\05. Footer and Attachments\Referred content blocks\footer_b2c_transactional") =%%    
 - local link: ./retrieve/MyProject/DEV/asset/block/20af5fbf-b4ac-4471-a7e6-2e3d5685c197.asset-block-meta.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/asset COMPONENT enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] get name and key for content block id
1 participant