• test vijay
  • NEWBIE
  • 135 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 9
    Replies
Hi Guys,
I am preparing for PD1 Certificate and I have finished my trailhead badge as well and now I am looking some online practice questions so that I can confidance for exam. can you please suggest me or give me any reference for PD1 questions.

Here is some websites from  which I have practiced but still I need more questions.

#1. https://www.salesforceben.com/salesforce-platform-developer-1-practice-exams/
#2. https://salesforcehandle.com/quizzes/salesforce-pd-1-certification-mock-test-1/
#3. https://www.certification-questions.com/salesforce-dumps/platform-developer-i.html
 if you have any pdf or personal questions for pd1 then its also works for me.

Thanks In Advance
 
Hi folks,
I have one requirment I want a custom datatable with inline editing in lwc.
can you please provide me any reference.
Thanks in advance

 
hi fellow,
I am facing a weird error. in my home page i get internal error and when I go to lightning app builder(click setup and app page) no error is showing there.
below screenshot will help you to understand better.
User-added image


below is lightning app builder img
User-added image
can someone help me what to do for resolving it. some component is attached to home page but no data is showing in there.

Thanks In Advance
 
hello folks,
I have a requirment in which I want to show some fields of  object based on recordId.I am using Lightning:editForm but problam is that everytime all fields keep on edit mode. I can use Lightning:RecordForm but I have to show fields in section.

My Main Requirment is that when page will load at that time all fields will show on view mode and when user click on Edit  Icon at that time record turn in edit mode such as standard Record form but I have to show fields in section.
Can someone help me to achieve this requirment.
I will be grateful.
Thanks In Advance
Hy experts,
I want to set a flow's variable value from process builder but I  am not able to find any way. could anyone tell me how to achieve this requirment.

Thanks In Advance
Hello Developers.
I have a Lwc Component that is on recordPage.I want to old value and new value that is changed when Record is update.
Can anyone suggest me how to achieve it.
Thanks in advance
Hello Experts,
#1. I want to call apex class from listView button. There is any way to acchieve this task.
#2. Actually, My main requirment is calling aura cmp from listView button.
If {2} is possible then I'll be grateful and if we can't call it then please suggest me how to acchieve {1}.
Thanks in advance
hello Developers,
I am facing Below error while I execute my batch class through test class.
 SObject row was retrieved via SOQL without querying the requested field: Contract.SBQQ_Quote_r
can anybody help me to resolving this.
Thanks in advance
 
hello Developers,
I have complete dynmic list view code and it's also working fine but problam is that when I add Owner.Alise And Owner.FirstName and something like more owner fields into standard Account ListView then its data is not showing.rest of field's data is coming but not owner field.
Follwing is my dynmic listView code.
I hope anybody help me to this.
<template>
    <article>
       <div class="slds-p-around_medium lgc-bg list_view_and_table_container"  id="myDIV">
          <lightning-tile label="Accounts"  type="media" href="javascript:void(0);" class="list_view_container" >
             <lightning-icon slot="media" icon-name="standard:account" size="medium" class="icon_custom_class">
             </lightning-icon>
             <div class="slds-form-element">
                <div class="slds-form-element__control">
                   <div class="slds-combobox_container testCustomCss">
                      <div class={dropdownTriggerClass} aria-expanded="false" aria-haspopup="listbox" role="combobox">
                         <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right"
                            role="none" onclick={handleClickExtend}>
                            <span class="current_filter">
                               {listViewName}
                               <lightning-icon
                                  class="slds-m-left_x-small slds-button__icon slds-icon-utility-down slds-icon_container forceIcon"
                                  data-data-rendering-service-uid="232" data-aura-rendered-by="371:0"
                                  data-aura-class="forceIcon" icon-name="utility:down" size="x-small">
                               </lightning-icon>
                            </span>
                         </div>
                        
                         <div  class="listViewPickerPanel deActive_ListView uiPanel--default uiPanel positioned south" 
                            aria-hidden="true" tabindex='0'  onfocusout={handelFocusOut} style="outline:none;">
                            <div id="listbox-id-1" class="slds-form-element slds-lookup forceVirtualAutocompleteMenu max_height"
                               role="listbox" >
                               <ul class="slds-listbox slds-listbox_vertical" role="presentation">
                                  <li role="presentation" class="slds-dropdown__header slds-text-heading--label forceVirtualAutocompleteMenuOption">
                                     <div>List Views</div>
                                  </li>
                                  <template for:each={listViewOptions} for:item="option">
                                     <li role="presentation" class="slds-listbox__item" key={option.value}>
                                        <div class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small"
                                           data-filter={option.value} onclick={getListViewValue}  
                                           >
                                           <span class="slds-media__figure slds-listbox__option-icon"
                                              data-filter={option.value}>
                                              <template if:true={option.show_option_icon}>
                                                 <lightning-icon icon-name="utility:check" size="xx-small" class="my-icon">
                                                 </lightning-icon>
                                              </template>
                                           </span>
                                           <span class="slds-media__body" data-filter={option.value}>
                                           <span class="slds-truncate" 
                                              data-filter={option.value}>{option.label}</span>
                                           </span>
                                        </div>
                                     </li>
                                  </template>
                               </ul>
                            </div>
                         </div>
                      </div>
                   </div>
                </div>
             </div>
          </lightning-tile>
       </div>
       <div class="table_cc">
         
<!--list view dataTable start here -->
          <lightning-datatable
          key-field="id"
          columns={lstviewCol}
          data={storeListViewRecords}
          >
  </lightning-datatable>
  <template if:true={isLoading}>
   <lightning-spinner alternative-text="spinner"></lightning-spinner>
</template>
<!--list view dataTable end here -->
          <template if:false={hasRecords}>
             <div class="No_Record_Found_Css">No items to display</div>
          </template>
       </div>
      
          </article>
 </template>
/* 6 July 2021 => */
import {LightningElement,wire} from 'lwc';
import fetchListView from '@salesforce/apex/CustomListViewInLwcCtrl.fetchListView';

import {getListUi } from 'lightning/uiListApi';
import Account_OBJECT from '@salesforce/schema/Account';
import Name_FIELD from '@salesforce/schema/Account.Name';

export default class ListViewInLwc extends LightningElement {
    lstviewCol;
    storeListViewRecords;
    isLoading = false;
	hasRecords = false;
	listViewOptions = [];
	//records;
  
	error;
	listViewName = 'Recently Viewed Accounts';
	defaultListView = "RecentlyViewedAccounts";
	
	@wire(fetchListView) ListView(value) {
		const {
			data,
			error
		} = value;
		if (data) {
			this.isLoading = true;
			let plistViewOptions = JSON.parse(JSON.stringify(data));


			let lstOption = [];
			for (var i = 0; i < plistViewOptions.length; i++) {

				lstOption.push({
					label: plistViewOptions[i].Name,
					value: plistViewOptions[i].DeveloperName,
					show_option_icon: false
				});
				if (this.defaultListView == plistViewOptions[i].DeveloperName) {
					lstOption[i].show_option_icon = true;
				}

			}
			console.log('lstOption===> ' + JSON.stringify(lstOption));


			this.listViewOptions = lstOption;
			this.isLoading = false;
		} else if (error) {
			this.isLoading = false;
			console.log('error===> ' + JSON.stringify(error))
		}


	}
	@wire(getListUi, {
		objectApiName: Account_OBJECT,
		listViewApiName: '$defaultListView' ,
		sortBy: Name_FIELD,
		pageSize: 100,
      }) listViewData({
		error,
		data
	}) {
		if (data) {
console.log('data getListUi: ' + JSON.stringify(data));
const columns = [];

            for(let Col in data.info.displayColumns){
                columns.push({
                    label : data.info.displayColumns[Col].label,
                    fieldName : data.info.displayColumns[Col].fieldApiName
                  });
            }
            this.lstviewCol = columns;
        console.log('this.columns' +  JSON.stringify(this.lstviewCol));

            
           
			let records = JSON.parse(JSON.stringify(data.records.records));
            let sAssignObj = [];
            for(let rec of records){
                console.log('sData : ' + JSON.stringify(rec.fields));
                let listViewData = [];
                for(let fldObj in rec.fields){
                    console.log('fldObj : ' +fldObj);
                    console.log('sData.fields[value] : ' + JSON.stringify(rec.fields[fldObj]));

                    let sObj =  this.lstviewCol.find(data => data.fieldName == fldObj);
                    console.log('sObj : ' + JSON.stringify(sObj));
                    if(sObj != undefined){
                        listViewData.push({"key" : [fldObj],
                                           "value" : rec.fields[fldObj].value}); 
                    }
                   }
                    //convert
                    var result = {};
                      for (var i = 0; i < listViewData.length; i++) {
                        result[listViewData[i].key] = listViewData[i].value;
                             }


                sAssignObj.push(result);
            }
            console.log("sAssignObj : " + JSON.stringify(sAssignObj));
			/* set ListView Option */ 
          
         let lstOption = JSON.parse(JSON.stringify(this.listViewOptions));
			for (let i = 0; i < lstOption.length; i++) {
				if (this.defaultListView == lstOption[i].value) {
					lstOption[i].show_option_icon = true;
				} else {
					lstOption[i].show_option_icon = false;
				}
			}
			this.listViewOptions = lstOption;
			/* ################################## */
			console.log(' records length : ' + records.length);

			if (records.length > 0) {
				this.hasRecords = true;
			} else {
				this.hasRecords = false;                 
			}
			console.log('this.hasRecords====> '+this.hasRecords);
            
			this.storeListViewRecords = sAssignObj;
			this.isLoading = false;
			this.error = undefined;

		} else if (error) {
			this.error = error;
			console.log('error : ' + JSON.stringify(error));
			this.isLoading = false;
			this.storeListViewRecords = undefined;
		}
	}
	
	handleClickExtend(event) {
	
		let getElement = this.template.querySelector('.listViewPickerPanel');
		//console.log('getElement.getAttribute("data-show") ==>' + getElement.getAttribute('data-show'));
		if (getElement.classList.contains('deActive_ListView')){
			getElement.setAttribute('aria-hidden', false);
			getElement.classList.remove('deActive_ListView');
			getElement.classList.add('active_ListView');
			this.template.querySelector('.listViewPickerPanel').focus();
		} else {
			
			this.closeListViewHelper();
		}
	}

 
	handelFocusOut(event) {
		let that = this;
		setTimeout(function(){ that.closeListViewHelper(); }, 300);
		
	}
	getListViewValue(event) {
		let listViewValue = event.target.dataset.filter;
        console.log('listViewValue : ' + listViewValue);
		if (listViewValue != this.defaultListView) {
			this.isLoading = true;
		}
		this.defaultListView = listViewValue;
		console.log(this.defaultListView);
		let getListViewLabel = this.listViewOptions.find(data => data.value == listViewValue);
       
		this.listViewName = getListViewLabel.label;
		console.log(this.listViewName);
		this.closeListViewHelper();
		
		   
	}
	closeListViewHelper(){
		let getElement = this.template.querySelector('.listViewPickerPanel');
		getElement.setAttribute('aria-hidden', true);
		getElement.classList.remove('active_ListView');
		getElement.classList.add('deActive_ListView');
		//getElement.setAttribute('data-show', 0);

	}

	
}
 
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
    <target>lightning__Tab</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        
    </targets>
</LightningComponentBundle>
//Follwoing is Css
.lgc-bg {
	background-color: rgb(242, 242, 242);
}

.lgc-bg-inverse {
	background-color: rgb(22, 50, 92);
}

.label-hidden>label {
	display: none !important;
}

.icon_custom_class {
	margin-top: 5px;
}

.current_filter {
	color: rgb(8, 7, 7);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.25;
	display: block;
	cursor: pointer;
}

.current_filter:hover {
	text-decoration: underline;
}

.custom_list_view {
	max-width: max-content;
}

.button_class {
	margin-left: 10px;
	margin-right: 10px;
}

.list_view_container {
	max-width: max-content;
}

.list_view_and_table_container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.max_height {
	max-height: 409px;
}

.deActive_ListView {
	opacity: 0;
	display: none;
	z-index: 9001;
	position: absolute;
	left: 0px;
	top: 24px;
	visibility: hidden;
}

.active_ListView {
	opacity: 1;
	display: block;
	z-index: 9001;
	position: absolute;
	left: 0px;
	top: 24px;
	visibility: visible;
}

.my-icon {
	--sds-c-icon-color-foreground-default: rgb(0, 112, 210, 1);
}
.No_Record_Found_Css {
	text-align: center;
	margin-top: 200px;
}

.table_cc {
	background-color: rgb(250, 250, 249);
}

Thanks In advance

 
hello peers,
I have a requirment. I'm trying to assign custom object to related to(WhaId) in task object but I am not able to do. as far as I know, we can assign but I am not able to assign. can anybody help me to find of  this solution.
Thank you
 
Hello Peers,
I want to send email from Email Activity of Object Related but
In Related to field, I am able to show almost every object but not contact.
I am little confused that why the object is not showing.
can any one help me in this scenario.

Thanks in advance

 
Hello Peers,
I want to write trigger on Service Report but I'm not able to search it in object manager. not only service Report but also work order.
Can anybody show me a way how to achieve this requirment.

Thanks in advance
Hi Experts,
I have downloaded dataloader from setup and as well as I have installed MSI file from following link.
https://www.azul.com/downloads/?os=windows
but the moment, I open data loader following line comes on cmd screen and it vanish suddenly.
Data Loader requires Java JRE 11 or later. Checking  if it is  installed...

Notice : my laptop is 32bit operating system.
Please provide me some guide. I have been trying to resolving it for long time.

Thank you

 
Hello Guys,
I have a requirment.I want to display contentVersion Data such as Png,Jpeg,Pdf,Img from apex to  Lightning component. 
can anyone help me for this.
It's very urgent.

Thank you
Hello Guys,
I have noticed that in salesforce you can clone opportunity but not account. there is no button on account detail page which account has clone.
I want to clone account record. is it possible without development we could clone record.
please provide me any way if it's possible.
Thank You 
hi developers,
@future (callout=true)
    Public static void sendHTTPRequest(String url, String body){
        
        Http http = new Http();
        HttpResponse res = new HttpResponse();
        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setBody(body);
        req.setMethod('POST');
        
        try {
            res = http.send(req);
        } catch(System.CalloutException e) {
            System.debug('CalloutException: '+ e);
            System.debug(res.toString());
        }
 }
above is my future callout method. I am trying to cover this method but error is coming : Methods defined as TestMethod do not support Web service callouts. 
following is my test class.

@isTest
public class colloutTest {
@isTest
    public static void testAccTriHandler(){
        test.startTest();
       string key = 'https://orgBaseUrl.salesforce.com/identity/connect/token';
       string body = '{"name" : 'dummy'}';  
  AccountCustomerNumber.sendHTTPRequest(key, body);
        test.stopTest(); 
    }
  
}
can somebody guide me that how to fix this problam.
Thanks in advance
hi Guys,
I am facing this error - 
System.SObjectException: common.apex.runtime.impl.ExecutionException: Apex CPU time limit exceeded
Source - Class.System.Test.loadData: line 53, column 1
Class.CaseTeamMemberUnitControllerTest.testSetup: line 9, column 1
below is my testClass
@testSetup static void testSetup() {
    Test.loadData(Account.sobjectType, 'records_accounts_with_cases_2021');
    Test.loadData(Contact.sobjectType, 'records_contacts_with_cases_2021');
    Test.loadData(Case.sobjectType, 'records_cases_2021');
    
  }


error is generating from this line Test.loadData(Case.sobjectType, 'records_cases_2021') which is added on line 9 at test class.
and In this records_cases_2021 file , I have only 50 records that i'm loading via static resource.
I have tried many ways and have searched on google but i'm not satisfied those answer.
can someone please show me a good way.
It's very argent.
thanks in advance
 
hy Guys,
I want to Create  AccountSahre WHERE RowCause='Territory'  such as I created AccountShare object I got this error : Error message: field integrity exception: RowCause (cannot insert sharing row with this cause).
following is piece of code of  my apex class and I am sure if i got accountShare object in test class then my requirment will be fulfuill.
Map<Id,account> accountMap = new Map<Id,account>();
set<Id> setAccShareIds = new set<Id>();
 for (Account a : [SELECT Id,Name, (SELECT UserOrGroupId from Shares WHERE RowCause='Territory') 
                   FROM Account WHERE Id IN :accountIds]) {
            accountMap.put(a.Id,a);
            if(!a.Shares.isEmpty()) {
                for(AccountShare s : a.Shares) {
                    setAccShareIds.add(s.UserOrGroupId);
                }
            }
        }
I have tried many way but not successed. can anybody know me how to resolve this issue.
Thanks In Advance
 
Hi Guys,
Greetings,
I want to call a Lwc Js Method when a standard case or any object update.I think It's possible for platform event but I am not able.
I tried empApi but not got success yet. 
I did follow following refering steps but not worked.
reference : https://newstechnologystuff.com/2020/08/15/platform-event-in-lightning-web-components/

can someone show me right way how to complete my requirment.
hello Guys,
Greetings,
for (Account a : [SELECT Territories__c, (SELECT UserOrGroupId from Shares WHERE RowCause='Territory'), (SELECT UserId, TeamMemberRole FROM AccountTeamMembers) FROM Account WHERE Id IN :accountIds]) {
            if(!a.Shares.isEmpty()) {
                for(AccountShare s : a.Shares) {
                    //tMap.put(s.UserOrGroupId, null);
                     system.debug('UserOrGroupId===> ' + s.UserOrGroupId);
 system.debug('RowCause===> ' + s.RowCause);                
}
            }
Actually, I have stuck in  this. I want to create a Account Where AccountShare.RowCause='Territory'
Please give me any way how to solve it.
Thanks In advance
 
Hi folks,
I have one requirment I want a custom datatable with inline editing in lwc.
can you please provide me any reference.
Thanks in advance

 
hi fellow,
I am facing a weird error. in my home page i get internal error and when I go to lightning app builder(click setup and app page) no error is showing there.
below screenshot will help you to understand better.
User-added image


below is lightning app builder img
User-added image
can someone help me what to do for resolving it. some component is attached to home page but no data is showing in there.

Thanks In Advance
 
Hi Experts,
I have downloaded dataloader from setup and as well as I have installed MSI file from following link.
https://www.azul.com/downloads/?os=windows
but the moment, I open data loader following line comes on cmd screen and it vanish suddenly.
Data Loader requires Java JRE 11 or later. Checking  if it is  installed...

Notice : my laptop is 32bit operating system.
Please provide me some guide. I have been trying to resolving it for long time.

Thank you

 
Hello Guys,
I have noticed that in salesforce you can clone opportunity but not account. there is no button on account detail page which account has clone.
I want to clone account record. is it possible without development we could clone record.
please provide me any way if it's possible.
Thank You 
hi developers,
@future (callout=true)
    Public static void sendHTTPRequest(String url, String body){
        
        Http http = new Http();
        HttpResponse res = new HttpResponse();
        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setBody(body);
        req.setMethod('POST');
        
        try {
            res = http.send(req);
        } catch(System.CalloutException e) {
            System.debug('CalloutException: '+ e);
            System.debug(res.toString());
        }
 }
above is my future callout method. I am trying to cover this method but error is coming : Methods defined as TestMethod do not support Web service callouts. 
following is my test class.

@isTest
public class colloutTest {
@isTest
    public static void testAccTriHandler(){
        test.startTest();
       string key = 'https://orgBaseUrl.salesforce.com/identity/connect/token';
       string body = '{"name" : 'dummy'}';  
  AccountCustomerNumber.sendHTTPRequest(key, body);
        test.stopTest(); 
    }
  
}
can somebody guide me that how to fix this problam.
Thanks in advance
hi Guys,
I am facing this error - 
System.SObjectException: common.apex.runtime.impl.ExecutionException: Apex CPU time limit exceeded
Source - Class.System.Test.loadData: line 53, column 1
Class.CaseTeamMemberUnitControllerTest.testSetup: line 9, column 1
below is my testClass
@testSetup static void testSetup() {
    Test.loadData(Account.sobjectType, 'records_accounts_with_cases_2021');
    Test.loadData(Contact.sobjectType, 'records_contacts_with_cases_2021');
    Test.loadData(Case.sobjectType, 'records_cases_2021');
    
  }


error is generating from this line Test.loadData(Case.sobjectType, 'records_cases_2021') which is added on line 9 at test class.
and In this records_cases_2021 file , I have only 50 records that i'm loading via static resource.
I have tried many ways and have searched on google but i'm not satisfied those answer.
can someone please show me a good way.
It's very argent.
thanks in advance
 
hy Guys,
I want to Create  AccountSahre WHERE RowCause='Territory'  such as I created AccountShare object I got this error : Error message: field integrity exception: RowCause (cannot insert sharing row with this cause).
following is piece of code of  my apex class and I am sure if i got accountShare object in test class then my requirment will be fulfuill.
Map<Id,account> accountMap = new Map<Id,account>();
set<Id> setAccShareIds = new set<Id>();
 for (Account a : [SELECT Id,Name, (SELECT UserOrGroupId from Shares WHERE RowCause='Territory') 
                   FROM Account WHERE Id IN :accountIds]) {
            accountMap.put(a.Id,a);
            if(!a.Shares.isEmpty()) {
                for(AccountShare s : a.Shares) {
                    setAccShareIds.add(s.UserOrGroupId);
                }
            }
        }
I have tried many way but not successed. can anybody know me how to resolve this issue.
Thanks In Advance
 
hello Guys,
Greetings,
for (Account a : [SELECT Territories__c, (SELECT UserOrGroupId from Shares WHERE RowCause='Territory'), (SELECT UserId, TeamMemberRole FROM AccountTeamMembers) FROM Account WHERE Id IN :accountIds]) {
            if(!a.Shares.isEmpty()) {
                for(AccountShare s : a.Shares) {
                    //tMap.put(s.UserOrGroupId, null);
                     system.debug('UserOrGroupId===> ' + s.UserOrGroupId);
 system.debug('RowCause===> ' + s.RowCause);                
}
            }
Actually, I have stuck in  this. I want to create a Account Where AccountShare.RowCause='Territory'
Please give me any way how to solve it.
Thanks In advance
 
Hello Guys,
I want to insert new BusinessHours in apex test class but such as i tried to insert BusinessHours from apex error is coming :DML operation Insert not allowed on BusinessHours. 
However, we can create BusinessHours from setup but i want to create Business hours from Apex.
Thanks in advance