• lkatney
  • NEWBIE
  • 155 Points
  • Member since 2014


  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 30
    Replies
Currently I am captuign a users location via script within a visualforce page.
<script>
    window.onload = function() {
        var startPos;
        var geoSuccess = function(position) {
            startPos = position;
            document.getElementById('{!$Component.inpform.pb.pbs.startLat}').value=startPos.coords.latitude;
            document.getElementById('{!$Component.inpform.pb.pbs.startLon}').value=startPos.coords.longitude;
            //alert('@@@ ' + document.getElementsByClassName('findclass')[0].value);
           document.getElementsByClassName('Latclass')[0].value =startPos.coords.latitude;
           document.getElementsByClassName('Lonclass')[0].value =startPos.coords.longitude;

        };
        navigator.geolocation.getCurrentPosition(geoSuccess);
    };
  </script>

This is fine but makes I cannot reuse the logic.  Would it be a better option to use in in a Apex Class so that the location capturing process can be used on any Object?  If so, how can I make the Class univeral to any object?
Thanks
Hi All,

I have created a new Lookup field on standard Prdoduct object which points to one of my custom objects. Field has been created successfully but when I'm trying to set  a value by clicking the magnifying glass the popup doesn't show any records of my Custom object. 
As suggested in some other posts I checked for Search settings in Setup > Customize > Search > Search Settings. Custom objects has been enabled for enhance search at there. Can anyone help me to figure out what is going on please?

Thanks,
Madhura
I am working on a flow wrapped in a lightning component as a global action and i am trying to figure out how to change the finish bahavior so the user is redirected to the home page. I came across these events ( force:navigateToObjectHome or force:navigateToUrl.) but I'm not sure where to used them in my lightning component. Any help with this would be greatly appreciated. My code is below for my component

Component:
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global" >

<aura:handler name="init"  value="{!this}" action="{!c.init}" />
<lightning:flow aura:id="flowData" />
</aura:component>

Controller:
 
({
init : function (component) {
// Find the component whose aura:id is "flowData"
var flow = component.find("flowData");
// In that component, start your flow. Reference the flow’s Unique Name.
flow.startFlow("New_IT_Support_Case");
   
},
})



 
  • January 10, 2020
  • Like
  • 0
//Data is getting append to the Html select tag, but not appending to the selectlist tag in saleforce.

Note: To use Repeat functionality only ..!

Visualforce page:
<apex:page controller="test12" >
 
<apex:form >
 
  Salesforce Selectlist:   
    <apex:selectList multiselect="false" size="1">
       <apex:selectOption ></apex:selectOption>
      <apex:repeat value="{!lstWrapper1}" var="a">
      <apex:selectOption itemLabel="{!a.Statename}" itemvalue="{!a.rating}" html-data-capitalname="{!a.capital}"></apex:selectOption>
      </apex:repeat>
    </apex:selectList>
    
    <br/> <br/>
   
   Html Selectlist:
    <select>
 <apex:repeat value="{!lstWrapper1}" var="a">
    <option value="{!a.rating}" data-capitalname="{!a.capital}">{!a.statename}</option>
    
    </apex:repeat>         
         </select>
     
</apex:form>
 
</apex:page>


Apex class:
 
public class test12 {

    
 
   
     
     public  string selectedOption{get;set;} 
     public Wrapper Wrapper1{get;set;}
     public list<wrapper> lstWrapper1{get;set;}
     
  public test12(){
      lstWrapper1 = new list<wrapper>();
      
      
    string  jsonexample1 =  ' { "overalldata": [ {"stateName": "Andrapradesh",  "rating": "5.0" , "active": "yes" ,"Capital":"Amaravathi"}, { "stateName": "Telangana",  "rating": "4.0" ,"active": "no","Capital":"Hyderabad" }, {"stateName": "Karnataka",  "rating": "5.0" ,"active": "no","Capital":"Banglore"} , {"stateName": "Maharastra",  "rating": "4.5" ,"active": "no","Capital":"Mumbai"}] } ';

        Map<String, Object> mapobj1= (Map<String, Object>)JSON.deserializeUntyped(jsonexample1);
        system.debug('the Mapped and deserialized values are:'+ mapobj1); 
        Object objj1 = (object)mapobj1.get('overalldata');
        system.debug('the data value is :::'+objj1);
        string  SerilizeEmpdata1 = system.json.serialize(objj1);
        system.debug(SerilizeEmpdata1);
    lstWrapper1 =(list<wrapper>)system.json.deserialize(SerilizeEmpdata1,list<wrapper>.class);
     system.debug(lstWrapper1);
       
      
  
  
   }
  
      public class Wrapper{
      public string  stateName{get;set;}
      public string  rating{get;set;}
      public string  active{get;set;}
      public string  Capital{get;set;}
      
      }
}

After inspecting: it was binded to the html tag but not salesforce tag..

User-added image 

thanks 
Deepika..!
 
Is there any way of displaying a picklist within an aura datatable?

I've read that only certain data types can be used within a datatable, but there must be a way of displaying a picklist or something similar where the user can select a value from a list of values?

Anybody managed to do this?
 
  • November 28, 2019
  • Like
  • 0
Hi All,
I am facing some issues with a lightning carousel that I am building in lwc like it is showing only 5 to 6 images inside the carousel and remaining are not showing up. If there is any limitation for the number of images could you please suggest the best approach to build a carousel for 1000's of images inside the carousel.
Here I am loading the images from the parent component.
<template>
   
              <div class="slds-m-around_medium">
                    
                                        
                        <div class="container">                    
                                    
                   <lightning-carousel> 
                                                                           
                      <template for:each={value}  for:item="rows">
                                 
                         
                              <lightning-carousel-image  width="100%" height="50%"  key={imageURL} src = {rows.imageURL}
                              header={rows.imageName}
                              description={rows.imageDescription}>
                             </lightning-carousel-image>
                             
                        
                           
                       </template>
                     
                    </lightning-carousel>
                </div>
               </div>
        <!--   </lightning-card> -->
</template>
 
import { LightningElement, api } from "lwc";

export default class fcxmCarousel extends LightningElement {
  @api selectdImage;
  @api value;
}

 
  • October 31, 2019
  • Like
  • 0
Dear Team ,

Greetings !!!

I am trying to integrate picklist in inline functionality of lightning datatable . Type column is picklist in below code . My controller code are as follows :

({
    doInit : function(component, event, helper) {
        component.set('v.mycolumns', [
            {label: 'Account Name', fieldName: 'Name', type: 'text', editable: true, initialWidth: 750},
            {label: 'Phone', fieldName: 'Phone', type: 'phone', editable: true},
            {label: 'Rating', fieldName: 'Rating', type: 'text', editable: true},
            {label: 'Number Of Employees', fieldName: 'NumberOfEmployees', type: 'number', editable: true},
             {label: 'Type', fieldName: 'Type', type: 'List', editable: true}
        ]);
        
        var action = component.get("c.details");
        action.setCallback(this, function(response) {
            var state = response.getState();
            
            if (state === "SUCCESS") {
                var res = response.getReturnValue();
                component.set("v.mydata", res);
            }
            else if (state === "ERROR") {
                var errors = response.getError();
                if (errors) {
                    if (errors[0] && errors[0].message) {
                        console.log("Error message: " + 
                                 errors[0].message);
                    }
                } 
                else {
                    console.log(response.getReturnValue());
                }
            }
        });
        $A.enqueueAction(action);
    },
    
    saveTable : function(component, event, helper){     
        //var data = component.get("v.mydata");
        var draftValues = event.getParam('draftValues');
        var action = component.get("c.updateDetails");
        action.setParams({lstForm  : draftValues});
        action.setCallback(this, function(response) {
            var state = response.getState();
            
            if (state === "SUCCESS") {
                var res = response.getReturnValue();
                $A.get('e.force:refreshView').fire();
                alert('Updated Successfully...');
            }
            else if (state === "ERROR") {
                var errors = response.getError();
                if (errors) {
                    if (errors[0] && errors[0].message) {
                        console.log("Error message: " + 
                                    errors[0].message);
                    }
                } 
                else {
                    console.log(response.getReturnValue());
                }
            }
        });
        $A.enqueueAction(action);
    }
})

Kindly suggest some solution in order i am able to perform this functionality .

Thanks & Regards
Sachin Bhalerao
Currently I am captuign a users location via script within a visualforce page.
<script>
    window.onload = function() {
        var startPos;
        var geoSuccess = function(position) {
            startPos = position;
            document.getElementById('{!$Component.inpform.pb.pbs.startLat}').value=startPos.coords.latitude;
            document.getElementById('{!$Component.inpform.pb.pbs.startLon}').value=startPos.coords.longitude;
            //alert('@@@ ' + document.getElementsByClassName('findclass')[0].value);
           document.getElementsByClassName('Latclass')[0].value =startPos.coords.latitude;
           document.getElementsByClassName('Lonclass')[0].value =startPos.coords.longitude;

        };
        navigator.geolocation.getCurrentPosition(geoSuccess);
    };
  </script>

This is fine but makes I cannot reuse the logic.  Would it be a better option to use in in a Apex Class so that the location capturing process can be used on any Object?  If so, how can I make the Class univeral to any object?
Thanks
Hello Guys
I am working on one requirement of creating a tree that can show upto 4 levels, I have achieved for 2 levels but don't know how to proceed further here.
I created 3 objects
1) Action_Item__c
2) Test__c
3)Test_Result__c

Test_Result__c is having lookup to Test__c and Test__c is having lookup to action item, so in tree for action item I want to show all related test__c records. I did for action item which is having self lookup. Can anyone help me out in this please. My code is below.

Apex Class:
public class accconhierarchy {
    Private list<Action_Item__c> acc;
    
    public List<accountWrap> accountList { get; set; }
    public accconhierarchy (){
        List<contactWrap> cw;
        accountList = new List<accountWrap>();
        acc = [select id,name,Priority__c,Hours_act__c,Due_Date__c,(select id,name,Priority__c,Hours_act__c,Due_Date__c from Related_Action_Items__r) from Action_Item__c limit 500];
        for(Action_Item__c a:acc){
            cw = new list<contactWrap>();
            For(Action_Item__c co : a.Related_Action_Items__r){
               cw.add(new contactWrap(co));
            }
            accountList.add(new accountWrap(a,false,cw));
        }
    }
    
    public class accountWrap{
        public Action_Item__c oAccount{get;set;}
        public boolean isSelected{get;set;}
        public List<contactWrap> contactset{get;set;}
        public accountWrap(Action_Item__c a,boolean b, List<contactWrap> c){
            oAccount=a;
            isSelected=b;
            contactset =c;            
        }
    }
    
    public class contactWrap{
        public Action_Item__c oContact{get;set;}
        public boolean isSelected{get;set;}        
        public contactWrap(Action_Item__c a){
            oContact=a;
            isSelected=false;                       
        }
    }
    
}
VF Page:
 
<apex:page controller="accconhierarchy">
  <apex:form >
      <apex:pageBlock >
      <style type="text/css">
        .showContacts {
            background: transparent url('/img/alohaSkin/twisty_sprite.png') 0 0 no-repeat;
        }
        .hideContacts {
            background: transparent url('/img/alohaSkin/twisty_sprite.png') 0 -11px no-repeat;
        }
    </style>
                  <apex:outputPanel layout="none"
                        rendered="{!accountList.size!=0}">
                        <table id="tableAccount" class="list" border="0" cellpadding="0" cellspacing="0">
                            <thead>
                                <tr class="headerRow">
                                    <th class="actionColumn">Action</th>
                                    <th>Action Item Name</th>
                                    <th>Due Date</th>
                                    <th>Hours Actual</th>
                                    <th>Priority</th>
                                </tr>
                            </thead>
                            <tbody>
                            <apex:repeat id="repeatAccount"
                                value="{!accountList}"
                                var="item">
                                <apex:variable var="acc" value="{!item.oAccount}" />   
                                <tr id="{!$Component.repeatAccount}:account" class="dataRow">
                                    <td class="actionColumn">
                                        <apex:inputCheckbox id="selectAccountRow"
                                            value="{!item.IsSelected}"
                                            onclick="javascript:toggleSelectAll(this, '{!$Component.repeatAccount}');"/>
                                    </td>
                                    <td class="dataCell">
                                        <apex:outputLink id="linkShowHide" value="javascript:toggleContactRow('{!$Component.repeatAccount}')">
                                            <img id="{!$Component.repeatAccount}:Img" src="/s.gif" class="showContacts" border="0" height="11px" width="11px" style="padding-right: 4px;"/>
                                            <apex:outputField value="{!acc.Name}" />
                                        </apex:outputLink>
                                    </td>
                                    <td class="dataCell"><apex:outputField value="{!acc.Due_Date__c}" /></td>
                                    <td class="dataCell"><apex:outputField value="{!acc.Hours_act__c}" /></td>
                                    <td class="dataCell"><apex:outputField value="{!acc.Priority__c}" /></td>
                                </tr>

                                <tr id="{!$Component.repeatAccount}:Contact" class="dataRow" style="display:none;">
                                    <td colspan="100" style="padding:10px; padding-left: 45px;">
                                        <h3>Child Action Items</h3>
                                        <br/>                                        
                                        <apex:outputPanel layout="none">                                            
                                            <table id="tableAccountContacts" class="list" border="0" cellpadding="0" cellspacing="0">
                                                <thead>
                                                    <tr class="headerRow">
                                                        <th class="actionColumn">Action</th>
                                                        <th>Name</th>
                                                        <th>Hours Actual</th>
                                                        <th>Priority</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                <apex:repeat id="repeatAccountContacts"
                                                    value="{!item.contactSet}"
                                                    var="subitem">
                                                    <apex:variable value="{!subitem.oContact}" var="con" />
                                                    <tr class="dataRow">
                                                        <td class="actionColumn"><apex:inputCheckbox id="selectContactRow" styleclass="ContactCheckbox" value="{!subitem.IsSelected}"/></td>
                                                        <td class="dataCell"><apex:outputField value="{!con.Name}" /></td>
                                                        <td class="dataCell"><apex:outputField value="{!con.Hours_act__c}"/></td>
                                                        <td class="dataCell"><apex:outputField value="{!con.Priority__c}" /></td>                                                        
                                                    </tr>
                                                </apex:repeat>
                                                </tbody>
                                            </table>
                                        </apex:outputPanel>
                                    </td>
                                </tr>
                            </apex:repeat>
                            </tbody>
                        </table>
                    </apex:outputPanel>
 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
 <script>
        jQuery.noConflict();
        function toggleContactRow(rowId) {
            try {
                var AccountImg = jQuery(document.getElementById(rowId + ":Img"));
                var ContactsRow = jQuery(document.getElementById(rowId + ":Contact"));
                if (AccountImg.hasClass("hideContacts")) {
                    AccountImg.attr("class", "showContacts");
                    ContactsRow.hide();
                }
                else {
                    AccountImg.attr("class", "hideContacts");
                    ContactsRow.show();
                }
            }
            catch (e) { alert(e); }
        }  

        function toggleSelectAll(elCheckbox, rowId) {
            try {
                var SelectAll = jQuery(elCheckbox);
                var ContactsRow = jQuery(document.getElementById(rowId + ":Contact"));
                ContactsRow.find(".ContactCheckbox").each(function() {
                    jQuery(this).prop("checked", SelectAll.is(":checked"));
                });
            }
            catch (e) { alert(e); }
        }

    </script> 
    </apex:pageBlock>
  </apex:form>
</apex:page>


 
I have a lightning component with 9 div boxes in it. By clicking on these divs, it should the content inside it in another component or another different div box. Is there anyway to do this? I am very new to lightning, so i am not aware of the functionality available in it. Please help me on this.
Code sample is here.
<aura:component>
   
    <div onclick="{!c.fire}" id="div1"> 
	<p>Section 1 Content</p>
	</div>
	
	<div onclick="{!c.fire}" id="div2"> 
	<p>Section 2 Content</p>
	</div>
	
	<div id="content">
	Display the content here depending on the Click happens on the above divs. If div 1 clicks it should show section 1 Content. If div 2 clicks it should show section 2 Content.
	(If this div content is possible to show in different component also fine.)
	</div>
	
</aura:component>

 
Hi Every one,

i am new to lightning i am learning know

i wrote apex class-

public class Lightning_3 {
   
    @AuraEnabled
    public static List<contact> show(){
        List<contact> contacts=[select id,FirstName,LastName,phone from contact limit 5];
        return contacts;
    }
  }
and after i design my component
.<aura:component controller="Lightning_3" >
    <aura:attribute name="contacts" type="List"/>
    <aura:attribute name="columns" type="List"/>
    <aura:handler name="init" value="{!this}" action="{!c.callme}"/>
    <lightning:DataTable keyfield="id" data="{!v.contacts}" columns="{!v.columns}"/>
</aura:component>
and after my controller
({
    callme : function(component, event, helper) {
        
        component.set('v.columns',[
            
            {label: 'FirstName', fieldName: 'FirstName', type: 'text'},
            {label: 'LastName', fieldName: 'LastName', type: 'text'},
            {label: 'phone', fieldName: 'phone', type: 'text'},
            
        ]);
            var action=component.get("c.show");
            action.setCallback(this,function(response){
               var state=response.getState();
               if(state==='SUCCESS'){
              
                var result=response.getReturnValue();
                component.set("v.data",result);
              }
            });
            $A.enqueueAction(action);
          }
})

actuall my task is to show contact recorrds on data table using apex in lightning
when i running this program it snot showing any error but i am not getting out put it s showing blank page.
if you know any one help me.

Thank you
Surender reddy.

 
I have developed code to over come limitation of print option for list view.
VF Page
<apex:page sidebar="false" standardStylesheets="false" cache="false" standardController="Account" recordSetVar="accounts" lightningStylesheets="true">
    <button id="upload-button" onclick="window.print();" style="margin-left: 50%;" Class="slds-button">Print</button>
    <apex:includeLightning />
    <div id="lightning" ></div> 
    <script>
        $Lightning.use("c:ListView", function() {
          $Lightning.createComponent("c:ListViewComponent",
          { label : "" },
          "lightning",
          function(cmp) {
             
          });
        });
    </script>
</apex:page>


Controller class
public with sharing class ListViewController {
    
    // Method to get all list view option available for the Account object 
    @AuraEnabled
    public static List<SelectOption> getListViews(){
        SelectOption  lstView=new SelectOption ('--None--','--None--');
        List<SelectOption> listviews = new List<SelectOption>();
        listviews.add(lstView);
        for(ListView lstObj : [SELECT Id, Name FROM ListView WHERE SobjectType = 'Account' order by name ASC]){
            listviews.add(new SelectOption (lstObj.id,lstObj.name));
        }
        return listviews; 
    }
    // Method to get the Account records based on the selected list view
    @AuraEnabled  
    public static DynamicTableMapping getFilteredAccounts(String filterId){
        list<string> headervalue =new list<string>();
        HttpRequest req = new HttpRequest();
        String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
        String endPoinURL = baseUrl+'/services/data/v32.0/sobjects/Account/listviews/'+filterId+'/describe';
        req.setEndpoint(endPoinURL);
        req.setMethod('GET');
        req.setHeader('Authorization',  'Bearer ' + UserInfo.getSessionId());
        Http http = new Http();
        HTTPResponse response = http.send(req);
        Map<String, Object> tokenResponse = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
        String query = (String) tokenResponse.get('query');
        system.debug('query--->'+query);
       for(string s:query.split(',')){
            s=s.trim();    
            if(s.startsWith('SELECT')){
                headervalue.add((s.removeStart('SELECT')).trim());        
            }else if(!s.startsWith('SYSTEMMODSTAMP') && !s.equalsIgnoreCase('SYSTEMMODSTAMP FROM ACCOUNT ORDER BY NAME ASC NULLS FIRST') && !s.contains('ASC')){
                headervalue.add(s.trim());
            }
        }
        
        List<ObjectValueMap> AccountList = new List<ObjectValueMap>();
        
        for(Account accountObj : database.query(query)){
            
            Map<String, Schema.SObjectField> objectFields = Account.getSObjectType().getDescribe().fields.getMap();
            list<FieldValues> fieldValue=new list<FieldValues>();
            for(string s:headervalue){
                Schema.DescribeFieldResult dr;
                if (objectFields.containsKey(s)) 
                      dr = objectFields.get(s).getDescribe();
                if(null!=dr)
                    fieldValue.add(new FieldValues(string.valueof(null==accountObj.get(dr.getName())?'':accountObj.get(dr.getName()))));            
                else
                    fieldValue.add(new FieldValues(string.valueof('')));
            }
            AccountList.add(new ObjectValueMap(accountObj,fieldValue));
        }
        
        return new DynamicTableMapping(headervalue,AccountList);        
    }
      
}



Lightning component
<aura:component controller="ListViewController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="AccountListViewList" type="SelectOption[]"/>
    <aura:attribute name="AccountList" type="DynamicTableMapping"/>
    <aura:attribute name="fieldList" type="string[]"/>
    <ui:inputSelect class="slds-select slds-size_small" aura:id="selectedViewId" label="Account View" change="{!c.getFilteredAccount}">
        <aura:iteration items="{!v.AccountListViewList}" var="listview">
            <ui:inputSelectOption text="{!listview.value}" label="{!listview.label}"/>
        </aura:iteration>
    </ui:inputSelect>
   
    <br/><br/>
    
    <table class="slds-table slds-table_bordered slds-table_cell-buffer">
        <thead>
            <tr class="slds-text-title_caps">
                <aura:iteration items="{!v.fieldList}" var="item">
                    <th scope="col">
                        <div class="slds-truncate" title="{!item}">{!item}</div>
                    </th>
                </aura:iteration>
            </tr>
        </thead>
        <tbody>
        <aura:iteration items="{!v.AccountList}" var="item" indexVar="index">
        <tr>
       
            <aura:iteration items="{!item.values}" var="item1">
                <td>
                     {!item1.value}   
                </td></aura:iteration>
        </tr>
        </aura:iteration>
        </tbody>
    </table>
</aura:component>


Component controller JS
({
    doInit : function(component, event, helper){
        var action = component.get("c.getListViews");
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                component.set("v.AccountListViewList",response.getReturnValue());
            }
        });
       
        $A.enqueueAction(action);
    },
    getFilteredAccount : function (component, event, helper) {
        var selected = component.find("selectedViewId").get("v.value");
        var action = component.get("c.getFilteredAccounts");
        action.setParams({filterId : selected});
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                component.set("v.AccountList",response.getReturnValue().value);
                component.set("v.fieldList",response.getReturnValue().headervalues);
            }
        });
        
        $A.enqueueAction(action); 
    },
    
})


Helper classes
public class DynamicTableMapping {
    
    @AuraEnabled
    public list<string> headervalues{get;set;}
    @AuraEnabled 
    public list<ObjectValueMap> value{get;set;}
    
    public DynamicTableMapping(list<string> headervalues,list<ObjectValueMap> value){
        this.headervalues=headervalues;
        this.value=value;
    }
}

--- Value map class--

public class ObjectValueMap {
	
    @AuraEnabled
    public account account{get;set;}
    @AuraEnabled
    public list<fieldValues> values{get;set;}
    
    public ObjectValueMap(account acc,list<fieldValues> values){
    	this.account=acc;
        this.values=values;
    }
}

-- Field values class--
public class FieldValues {
	@auraenabled
    public object value{get;set;}
    
    public FieldValues(object value){
        this.value=value;
    }
}

You can modify this code any other object you wish to implement.
Create listview button with the VF page.
As part of an automated sandbox refresh and re-configure process we would like to be able to set up Remote Site Settings via the API.

This appears to be published as the RemoteProxy object.

The theory is that our script will disable the existing settings, and create replacements fully configured.  It appears that we need to do this as we cannot update the existing settings.

Unfortunately it doesn't look like we can set everything up.

If we pass through everything we want to set on a create message we get:
FIELD_INTEGRITY_EXCEPTION: Only the Metadata and FullName fields may be specified on RemoteProxy, or else Metadata must be excluded. Invalid field(s): [ProtocolMismatch, SiteName, IsActive, EndpointUrl]]
  name: 'FIELD_INTEGRITY_EXCEPTION',
  errorCode: 'FIELD_INTEGRITY_EXCEPTION',
  fields: [ 'ProtocolMismatch', 'SiteName', 'IsActive', 'EndpointUrl' ]
If we omit the Metadata field (as the message implies we should we get:
Adding Remote Site Setting: AWS
{ [REQUIRED_FIELD_MISSING: You must provide a valid Metadata field for RemoteProxy]
  name: 'REQUIRED_FIELD_MISSING',
  errorCode: 'REQUIRED_FIELD_MISSING',
  fields: [] }
Does anyone know how we might set-up the Remote Site Settings via the API?

 
Can anyone provide some idea or approach on how to create a multiselect picklist like below pic.User-added image

Regards
What is the exact use of trigger factory? Why we're using it? Can you please give me any small example of trigger factory.