• LouisT
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi all,

I am trying to make an aura component that I can use in flow screens that display a list of countries. 
So far my code looks like this:
controller:

init: function(cmp, event, helper) {
        cmp.set("v.countryOptions", helper.getCountryOptions());
helper:
countryOptions: [
{'label': 'Afghanistan', value: 'AF'},
{'label': 'Aland Islands', value: 'AX'},
{'label': 'Albania', value: 'AL'},
{'label': 'Algeria', value: 'DZ'},
{'label': 'Andorra', value: 'AD'},
{'label': 'Angola', value: 'AO'},
{'label': 'Anguilla', value: 'AI'},
.... ]

Now, in the countryOptions list I would like to use custom labels for the label, like this:

{'label':  {!$Label.c.england}, value: 'EN'},

However this does not work. Only values inbetween '' are accepted and when I use '{!$Label.c.UPE_grues}' I just get the literal value.

Is there anyway to use custom labels here?

Many thanks,
  • November 04, 2021
  • Like
  • 0
Hi all,

I am currently working on a custom list button to use on the opportunites related list on accounts. I want to use this list button to predefine the values of certain fields. Up untill a certain point everything works fine. However, the moment I add "&backgroundContext=%2Flightning%2Fr%2FAccount%2F{!Account.Id}%2Fview" or "&backgroundContext=/lightning/r/Account/{!Account.Id}/view" to the URL, the default field values or not predefined as set in the button URL. This background context is rather important, the white background without it is definitely not a great user experience.

Button URL :
/lightning/o/Opportunity/new?recordTypeId=0120Q0000001LaTQAU&defaultFieldValues=OwnerId={!Account.OwnerId},AccountId={!Account.Id},Name={!RIGHT(TEXT(YEAR(today())),2)}{!IF(LEN(TEXT(MONTH(TODAY())))=1,"0"+TEXT(MONTH(TODAY())),TEXT(MONTH(TODAY())))}{!DAY(TODAY())}-{!LEFT( User.FirstName , 1)}{!LEFT( User.LastName, 1)},StageName=Nouvelle,Probability=5,Filiale1__c={!Account.Filiale1__c}&nooverride=1&navigationLocation=RELATED_LIST&uid=162203506651570185&backgroundContext=%2Flightning%2Fr%2FAccount%2F{!Account.Id}%2Fview

Here's a screenshot of the button when the background context is added
User-added image

and here a screenshot without the background context
User-added image
Any help would be greatly appreciated!

Thanks
 
Hi,

I have created a new field in the account object. 
The field is a lookup of contactperson. 

When I create a organisation, it now asks for a contactperson, which I can fill in. Then afterwards i have added this field to my listview, which works fine. 
User-added image

However, when I click on the account. It has no related contactpersons. Any idea on how to solve this?

User-added image

Many thanks