I'd expect you to need a server side controller to pass the custom settings to the lightning component's controller. If you were using hierarchy custom settings, those could be related to either specific users or to profiles. In the case of a list setting, your component's controller first needs to be able to do something like below:
List<Games__C> mcs = Games__c.getall().values();
After which you can then associate the values with the fields. In the case of a hierarchy, you'd be getting an instance
which you'd associate with the user profile or Id as below:
Hierarchy__c CS = Hierarchy__c.getInstance(SysAdminID);
Hierarchy__c CS = Hierarchy__c.getValues(RobertId);
As you can see from the above examples, all of these would best be retrieved from a server side controller. I'm not certain there are lightning component methods that support retrieving them directly as of yet.
EDIT:
Based on your comments, it sounds like you're either trying to edit the values of existing custom setting lists, or want to create new a instance of a custom setting list. Which one you want to do isn't clear. See Custom Setting Methods in the Apex Docs.
First, you're going to want to check to make certain that the list isn't 'read only'. If it isn't, obtain the name
of the list. Once you have that, I believe you're probably still going to need a server side controller to either update any existing lists or insert new instances of lists with different names. You'll want to check the CRUD permissions for the list.
getAll()
returns values for all custom fields associated with the list setting.
CustomSettingName__c mc = CustomSettingName__c.getValues(data_set_name);
Both getInstance(dataSetName)
and getValues(dataSetName)
return the custom setting data set record for the specified data set name.
To overwrite the default instance of a custom setting you can do something like the following:
My_Settings__c settings = new My_Settings__c();
settings.Page_Size__c = 5;
settings.debugging__c = true;
insert settings;
If you wanted a new instance with a name of SettingList2
, you'd need to modify the above to reflect that it's a new instance and assign the name before inserting it.
A straight answer would be - you cannot do this,
But there are workarounds, even with a customization solution.
This is a new solution but it works great:
Go to your object's setup page
Go to the Buttons, Links, and Actions
section
Click New Action
on 'Action Type' select Update a Record
enter all other data as you want and click save
:
- The next page is a layout page - fill all the fields that you want:
click save
- now you have created the layout of the update action.
You can now select Predefined Field Values
as you like...
now you need to add this layout to your app builder:
Go back to your object setup page and open and edit your Lightning Record Page
Add a tab
Add to your tab the Related Record
standard lightning component
enter header
in the 'Lookup field' enter Use this Object
In the 'Update Action' select the layout you have created:
- Save the record page (and activate it if you haven't done it untill now)
That's it
Enjoy!!!
Best Answer
You cannot directly control the tab order in Lightning any longer. This is documented in the Known Issue.
Original Answer
Set the tabindex parameter for each element, such as:
(The browser will go to each increasingly higher index on each tab).
Or, you can lay out two blocks side-by-side, going down; this means that the page will tab downwards. That might look like this: