• Kishore Vamsi 6
  • NEWBIE
  • 30 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 8
    Replies
I want to know Salesforce best process to take data backup and restore.

Thanks!!!
 
I am getting below error when imperative method return null values.
Cannot add property 0, object is not extensible

name=[];

callaccountName(){
        getaccountList().then(data => {
                this.name = data;
                
        })
    }


Error :Cannot add property 0, object is not extensible

 
I want to capture first values in list of string using js controller. my apex getListofString returning list strings.

 
nameList =[];
firstValue='';
getListofString().then(data => {
                this.nameList = data;
               this.firstValue=?
                
        })
I need to display status picklist values from order item object. below code giving null values. Please suggest how to get picklist values with out record type
 
import { getObjectInfo } from 'lightning/uiObjectInfoApi';
import OrderItem_OBJECT from '@salesforce/schema/OrderItem';
import { getPicklistValues } from 'lightning/uiObjectInfoApi';
import OrderItem_STATUS_FIELD from '@salesforce/schema/OrderItem.Status__c';

@wire (getObjectInfo, {objectApiName: OrderItem_OBJECT})
    objectInfo;
 
    @wire(getPicklistValues,
        {
            recordTypeId: '$objectInfo.data.defaultRecordTypeId',
            fieldApiName: OrderItem_STATUS_FIELD
        }
    )
    picklistValues;
I am new to LWC, I need to display list of contacts in table and i want to display account info upon clicking contact name in LWC component. 

Thanks in advance.
public class sampleCons {
    
    public string selectedValue {get;set;}
    public boolean isDisabled{set;get;}
    public sampleCons(ApexPages.StandardController controller){
        isDisabled=true;
    }
    public PageReference test() {
        if(selectedValue == 'True'){
        // perfom your logic here
        system.debug('====>'+selectedValue);
            isDisabled=true;
        } else if (selectedValue == 'False'){
            system.debug('====>'+selectedValue);
              isDisabled=false;
        // perform your logic here
        }
        return null;
    }
                
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>(); 
        options.add(new SelectOption('True','True')); 
        options.add(new SelectOption('False','False'));
        system.debug('====>'+options);
        return options; 
    }   
}
 
<apex:page standardController="Account" extensions="sampleCons">
    <apex:form id="myForm">
        <apex:pageMessages />
        <apex:selectRadio value="{!selectedValue}">
            <apex:selectOptions value="{!items}">
           
            </apex:selectOptions>
            </apex:selectRadio><p/>
        <apex:pageBlock title="Edit Contact" rendered="{!isDisabled}">
            <apex:pageBlockSection columns="1">
        <apex:inputField value="{!account.name}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
     </apex:form>
 </apex:page>

User-added image
I  am new to VF code, I have tried above code but it is not working for me. If I select true radio button then account name should be display and if I select false then it should be disabled
I am getting list if string from apex and I want display those strings into one selected picklist and finally user can select one string in that picklist.
 
Apex Returns List<string>  s = [{"Banglore","Chennai","Noida"}];

At the end user able to select any one of city in selected picklist
I don't want to display desciption as blank, If it is blank I need to display prior value. Can I display old value if new value is blank in Output panel

<apex:outputPanel rendered="{!IF(ISBLANK(Case.Account__r.Description),false,true)}">
                            <a id="accName" title="Account" href="/{!Case.Account__c}" target="_blank" class="link con-subtab-link-a">{!Case.Account__r.Description}</a>
                        </apex:outputPanel>
I am not able to see below fields on Chat Transcript fields.
1.Current Page
2. Vistor

Can any one help me to find out these two fieds 
I want to display more than 1000 account names in one picklist using select option.

<apex:selectList value="{!myAccountspicklist}" >
<apex:selectOptions value="{!myaccounts}"/>
  </apex:selectList>

public List<Account> getMyaccounts(){
        List<Account> lstAccount = [select id,name from account];
        return lstAccount;
    }
I want to know Salesforce best process to take data backup and restore.

Thanks!!!
 
I need to display status picklist values from order item object. below code giving null values. Please suggest how to get picklist values with out record type
 
import { getObjectInfo } from 'lightning/uiObjectInfoApi';
import OrderItem_OBJECT from '@salesforce/schema/OrderItem';
import { getPicklistValues } from 'lightning/uiObjectInfoApi';
import OrderItem_STATUS_FIELD from '@salesforce/schema/OrderItem.Status__c';

@wire (getObjectInfo, {objectApiName: OrderItem_OBJECT})
    objectInfo;
 
    @wire(getPicklistValues,
        {
            recordTypeId: '$objectInfo.data.defaultRecordTypeId',
            fieldApiName: OrderItem_STATUS_FIELD
        }
    )
    picklistValues;
public class sampleCons {
    
    public string selectedValue {get;set;}
    public boolean isDisabled{set;get;}
    public sampleCons(ApexPages.StandardController controller){
        isDisabled=true;
    }
    public PageReference test() {
        if(selectedValue == 'True'){
        // perfom your logic here
        system.debug('====>'+selectedValue);
            isDisabled=true;
        } else if (selectedValue == 'False'){
            system.debug('====>'+selectedValue);
              isDisabled=false;
        // perform your logic here
        }
        return null;
    }
                
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>(); 
        options.add(new SelectOption('True','True')); 
        options.add(new SelectOption('False','False'));
        system.debug('====>'+options);
        return options; 
    }   
}
 
<apex:page standardController="Account" extensions="sampleCons">
    <apex:form id="myForm">
        <apex:pageMessages />
        <apex:selectRadio value="{!selectedValue}">
            <apex:selectOptions value="{!items}">
           
            </apex:selectOptions>
            </apex:selectRadio><p/>
        <apex:pageBlock title="Edit Contact" rendered="{!isDisabled}">
            <apex:pageBlockSection columns="1">
        <apex:inputField value="{!account.name}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
     </apex:form>
 </apex:page>

User-added image
I  am new to VF code, I have tried above code but it is not working for me. If I select true radio button then account name should be display and if I select false then it should be disabled
I have a lightning component which contains input fileds(checkbox and picklist). These fields are not related to any object. 
How can i pass the field values from component to JS controller on click of submit button??

NOTE: I cannot make use of Component.find() or aura:attribute as the fields on the component are populated through aura:iteration.
Any help would be highly appreciated.
  • March 08, 2020
  • Like
  • 0
I am getting list if string from apex and I want display those strings into one selected picklist and finally user can select one string in that picklist.
 
Apex Returns List<string>  s = [{"Banglore","Chennai","Noida"}];

At the end user able to select any one of city in selected picklist
I want to display more than 1000 account names in one picklist using select option.

<apex:selectList value="{!myAccountspicklist}" >
<apex:selectOptions value="{!myaccounts}"/>
  </apex:selectList>

public List<Account> getMyaccounts(){
        List<Account> lstAccount = [select id,name from account];
        return lstAccount;
    }