Skip to main content

#Custom Metadata2 discutindo

Context:

We have a Screen Flow (processType: Flow, API v62.0, no explicit runInMode) that queries a Custom Metadata Type (Mapping_Trade_Media__mdt) using a Get Records element with storeOutputAutomatically=true. The flow then references the Media__c field from that lookup to create a SalesTeam__c record.

Problem:

User A can execute the flow successfully. User B gets the following error at the Create Records step:

What we've verified:

  • Both users are on the same Profile
  • Both users have the same Permission Sets (User B actually has 2 additional PS)
  • Neither user has ViewAllData, ModifyAllData, or CustomizeApplication
  • The Custom Metadata Type has visibility: Public
  • The field Media__c has fieldManageability: DeveloperControlled

 

 

 

#Custom Metadata

1 resposta
  1. 20 de ago., 13:52

    Hi Louise - the CMT read is not the problem (its Public visibility works, which is why User A gets through). 'field is not available for the current user' at Create Records is a field-level security error on a field you are SETTING on the new SalesTeam record - the running user needs Edit (FLS) on every field the Create writes, and User B is missing it on one of them. 

     

    Two things that make this click: 

    1. Run mode will not fix it. Salesforce enforces FLS on record fields even in System context ('system context does not apply to record fields'), so runInMode cannot bypass this - it has to be a field-permission fix. 

    2. 'More permission sets' is a red herring - what matters is Edit on that one field, not the count. The classic reason someone has MORE permission sets but LESS field access is a Muting Permission Set inside a Permission Set Group they belong to, which mutes that field's Edit. Check every group User B is in for a muting set. 

     

    Fastest way to pinpoint it: 

    - Debug the flow as User B (Flow Debug, 'Run as another user') - the error will name the exact field. 

    - Check that field's Edit access for User B (Object Manager, the field, Field-Level Security) and look for muting in their permission set groups. 

    - Compare A vs B on that ONE field's Edit, not their overall permission set list. 

     

    Grant User B Edit on that target field (or remove the muting) and it will pass. 

     

    If this helps, please mark it as the Best Answer so it helps the next person - thanks :)

0/9000
2 respostas
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    8 de mar. de 2024, 00:27

    Hello @Matt Hammel you cannot do it so far. UnofficialSf share a flow+Apex component that let you do that by a non-admin system user you need to get it and configure first): 

    https://unofficialsf.com/save-and-update-custom-metadata-records-using-flow/

    https://github.com/jongpie/CustomMetadataSaver

    Eric

0/9000

 I did everything correctly in 2 different playgrounds in second one I get exactly same results as per guide in Account and Opp.

https://trailhead.salesforce.com/content/learn/modules/custom_metadata_types_dec/cmt_formulas

I honestly am pissed off it's a waste of time: my current VR is as follows:

IF(

(ISPICKVAL( Support_Tier__c , "Gold")

&&

( AnnualRevenue <

$CustomMetadata.Support_Tier__mdt.Gold.Minimum_Spending__c * 20

)

), TRUE, FALSE

)

 

I tried different ones and submitted case with Support which also made me waste 30m bouncing from general support to bot.

#Trailhead Challenges #Custom Metadata

3 respostas
0/9000

Hello #Trailblazers

 

I've made some LWC/Aura components that is published on Playground.

 

Below is list of LWC/Aura that is Published on Playground on Previous Month:- 

 

1. News Lightning Component :- This component is used to display any publicly available news channel website. To use this we need only 2 things Channel Name and URL/Website-link Address. In this we also provide test-class for both Positive/Negative behavior.

 

Hello I've made some LWC/Aura components that is published on Playground. Below is list of LWC/Aura that is Published on Playground on Previous Month:- 1.

 

2. Lightning Component Inside Lightning Web Component:- In our business, If we want to invoke a lightning web component on a visualforce page that has a parameter according to lightning component that is also combined in the same VF or its vice versa then this article will guide you to pass variables in bi-directional ways from LWC to LC or LC to LWC.

 

188_Lightning Component Inside Lightning Web Component 2.png.png

 

Also Published a Article on Force Talks :- salesforce-lightning-component-inside-lightning-web-component-using-visualforce-page

 

3. Data Masking - Lightning Web Component:- This LWC is very useful when we want to hide some protected data to display directly. Currently, we can get display data by hovering each cell on the table.

Data Masking-Lightning Web Component 2.png.png

 

Features:- 

  • Data Protected using * Symbol (8 Characters)
  • Showing Phone, Text type Fields.
  • Cell Hovering is used to display Data.

4. Drag & Drop Address of Account on Map - Lightning Web Component:- This LWC is used to drag and drop account name and then directly locate the account location using the address field on Google Map. We can add it to Home Page, Record Page.

 

Also Published a Article on Force Talks :-

 

5. Object Viewer - Lightning Web Component:- This LWC is used to see all the Standard as well as Custom Object with all of their Record Types & Child Relationships.

As we know we can use Schema Builder, But this LWC is useful to show all the Objects through a single screen without navigating to another screen.

153_Object Viewer - Lightning Web Component.png.png

 

Below are the articles that is published on force talk about #DocuSign For Salesforce & Mass Insert/Delete #Custom Metadata 

 

  1. Docusign E-Signature in Salesforce | The Integration Guide
  2. Mass/Bulk Insert Custom MetaData Records through CSV | Salesforce Developer Guide

3. Marketing Cloud Custom Profile/Subscription Center :- (Gists Link - https://gist.github.com/PrafullJain/5161cb1befbb8954c24dd7493d19c6e1)

CustomProfileCenter.jpg

 

My Portfolio:- Prafull Jain Github Portfolio

 

#Salesforce Developer #Trailhead Community #LWC Development  #Addons #Aura Lightning Components #Marketing Cloud

0/9000

Hey Trailblazers,

 

I'm very new to Flows and am building an opportunity process. I want to trigger the flow based on the Record Type, but I know that hardcoding is a big no-no (@Steve Molis shoutout.) 

 

I'm trying to figure out what's the best way to go about this? I create a custom MetaData type for Record Type IDs corresponding with the text label, but now I'm not sure how to pull them into the criteria to start the flow. 

 

Thanks for your advice!

Clare

 

#Flows #Flow #Automation #Custom Metadata

9 respostas
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    5 de out. de 2021, 16:41

    My sincere apologies @Steve Molis lol

    If you're willing to create a new field, you may as well create a formula returning the record type name on Opportunity. You can then use it in the criteria in the start element.

    There was actually a conversation on Twitter about this exact thing (and you replied on it with your now infamous meme)

0/9000
1 resposta
  1. 24 de out. de 2021, 09:17

    Hi @Adarsh Agrawal,

     

    Thank you posting your question. May I recommend you to call your component in AURA component first, then access all the information in your controller.js file. I hope this will resolve your issue. Please do let me know if you need any further information. Have a great day ahead!

     

    Thank you

    Nagarjuna

0/9000

I have created a dynamic component with dynamic fields and i want to use that value in a aura attribute. Can i do that, if yes, how?

 

#Aura Component  #Custom Metadata  #Trailhead Challenges  #Service Cloud  #Automation

1 resposta
0/9000

I have a large list of email domains, that gets updated semi regularly. I would like to create a checkbox on our account object, that checks a checkbox when the Account record's 'email domain' field is in the master list of Email Domains. 

 

In the past, I used workflow rules and field updates to accomplish this - I wrote long contains() formulas. Because of the character limit of workflow formulas, I needed to create multiple workflow rules to accomplish this task - and because the list grows, we need to continually add new workflow rules. 

 

I am looking to migrate this process. I was thinking of doing this in APEX, but that requires me to work with our Devs anytime new domains need to be added. I have heard using Custom MetaData - I might be able to accomplish this. 

 

Any thoughts?

 

#Salesforce Developer

 

@* Salesforce Developers *

1 resposta
0/9000

Has anyone worked with Custom Metadata relationships and source control?

 

It seems like I cannot deploy a child metadata record in the same change as the parent record - the parent record must exist prior to the creation of the child. It's difficult when you want to migrate to a higher environment because you need to perform at least two deployments.

 

Is there any way to work around this?

8 comentários
0/9000

đź”” Inspired by Zachary Sexton's video, posted by Spencer Lowe, I've decided to investigate further on how to display an image on a record field without using a long formula.

 

In this article, I will demonstrate how to use Flow Builder and Custom Metadata for this purpose.

Displaying a Country Flag Image In a Record Field with Flow and Custom Metadata Type

0/9000