Saturday, April 19, 2025
HomeInterview QuestionCognizant Salesforce Developer Interview Experience

Cognizant Salesforce Developer Interview Experience

Telegram Group Join Now
whatsApp Channel Join Now
5/5 - (1 vote)

Cognizant Salesforce Developer Interview Experience: If you are looking for Cognizant salesforce interview questions and answers or Cognizant ssalesforce developer interview questions then you are on the right page. Because here we have cover one candidates interview experience and question which was asked on Cognizant 20 NOV 2024 online Technical Round. If you have preparing for Cognizant interview then go thought this question and answer.

Cognizant Salesforce Developer Selection Process:

There will be total 3 round in Cognizant company for the role of Salesforce Developer Role

  1. Technical Round (Online)
  2. Techno Managerial Round
  3. HR Round (Salary discussion).

Cognizant Salesforce Developer Interview Experience 2024-2025:

Qns : Intoduction

Qns: 1 Can We Restrict Access Using Permission Set?

Answer 1: Yes, permission sets are primarily used to grant additional access, not restrict it. To restrict access, you would use profiles, sharing rules, or field-level security, as permissions in Salesforce are additive in nature.

Qns: When Did You Last Use Permission Sets and for What Purpose?

Answer 2: The last use of permission sets was to provide specific users access to a new custom object in Salesforce without altering their existing profiles. This ensured the security model remained intact while providing flexibility in access control.

Qns: What is Muting for Permission Sets?

Answer 3: Muting permission sets is a feature in Permission Set Groups that allows administrators to disable certain permissions within the group, offering fine-grained control over permissions without needing to recreate or modify individual permission sets.

Qns: Worked on CRM Dashboards?

Answer 4: Yes, I have worked on CRM dashboards to provide actionable insights into key metrics like sales performance, pipeline status, and customer trends by integrating custom reports and real-time data visualization.

Qns: How Can We Retrieve CRM Dashboards?

Answer 5: CRM dashboards can be retrieved using Metadata API, Workbench, or Salesforce CLI. Example:

bashCopy codesfdx force:source:retrieve -m Dashboard:Dashboard_Name

Qns: What Are the Ways in LWC for Child-to-Parent and Parent-to-Child Communications?

Answer 6:

  • Parent to Child: Use properties (@api decorator) or public methods (@api method).
  • Child to Parent: Use custom events (dispatchEvent) that the parent component listens for.

Qns: Explain LWC Lifecycle

Answer 7: Check Answer Here : Answer

Qns: Tell Me Some Differences Between Aura & LWC

Answer 8:

AspectAuraLWC
FrameworkBuilt on Aura FrameworkUses Web Standards (HTML/JS)
PerformanceSlower, uses Shadow DOMFaster, uses Native DOM
ReusabilityLess reusable componentsHighly reusable components

Qns: What Can We Do With Aura and Not in LWC?

Answer 9: Aura supports two-way data binding and enables features like LockerService, which is stricter compared to LWC. It also supports dynamic component creation, which LWC does not natively allow.

Qns: When Does Wire Method Get Called in LWC Lifecycle?

Answer 10: The wire method is invoked when:

  • The component is loaded.
  • Any reactive property specified in the wire adapter changes.

Qns: Why Do We Use Get and Set in LWC?

Answer 11: Getters (get) and setters (set) are used for:

  • Calculating values dynamically for templates.
  • Tracking changes to a property and executing logic when the value changes.

Qns: What is String Mutation in LWC?

Answer 12: String mutation refers to dynamically changing string values, often tracked for reactive rendering. Example: Appending text to a variable and updating the DOM in real-time.

Qns: What Are the Advantages of Using Wire Method?

Answer 13:

  1. Declarative and reactive data fetching.
  2. Automatic updates when the data source changes.
  3. Improved performance by leveraging cache where applicable.

Qns: How Does the Wire Method Detect Data Changes?

Answer 14: The wire method listens to changes in the underlying data source or updates to any reactive properties used in the method.

Qns: Open Notepad and Write Code for Showing Related Contacts and Opportunity of Account Object

Answer 15:

Approach: Use getRelatedListRecords wire adapter in LWC.

import { LightningElement, wire } from 'lwc';
import { getRelatedListRecords } from 'lightning/uiRelatedListApi';

export default class RelatedContactsOpportunities extends LightningElement {
contacts = [];
opportunities = [];

@wire(getRelatedListRecords, {
parentRecordId: '001XXXXXXXXXXXXXXX', // Replace with Account Id
relatedListId: 'Contacts',
fields: ['Contact.Name', 'Contact.Email']
})
wiredContacts({ data }) {
if (data) {
this.contacts = data.records;
}
}

@wire(getRelatedListRecords, {
parentRecordId: '001XXXXXXXXXXXXXXX',
relatedListId: 'Opportunities',
fields: ['Opportunity.Name', 'Opportunity.Amount']
})
wiredOpportunities({ data }) {
if (data) {
this.opportunities = data.records;
}
}
}

Qns: How Can I Display N Number of Records Without Pagination?

Answer 16: Use an infinite scroll with a load more button or event to fetch more data dynamically and append it to the list.

Qns: Can We Control Field Label Security in Apex? How?

Answer 17: No, field label security cannot be controlled in Apex. However, you can enforce field-level access using the stripInaccessible method to filter out fields the user does not have access to.


Qns: What Are Wrapper Classes? Can You Write Sample Code?

Answer 18: A wrapper class is a custom data structure that groups related objects or data for easier handling in Apex.

Sample Code:

public class AccountWrapper {
public Account acc { get; set; }
public Boolean isSelected { get; set; }

public AccountWrapper(Account a, Boolean selected) {
this.acc = a;
this.isSelected = selected;
}
}

Qns: Write a Trigger: When Checkbox is Checked on Meeting Object, Change Status to Cancelled

Answer 19:

Trigger Code:

trigger UpdateMeetingStatus on Meeting__c (before update) {
for (Meeting__c meeting : Trigger.new) {
if (meeting.Checkbox__c && meeting.Status__c != 'Cancelled') {
meeting.Status__c = 'Cancelled';
}
}
}

Check Other Companies Interview Experience:

Follow Us for Daily Salesforce Jobs Hiring Update:

Social PlatformLinks
TelegramJoin Here
WhatsappJoin Here
LinkedInFollow Here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments