+ Start a Discussion
Yash Kumar GuptaYash Kumar Gupta 
Hi All
I refere "https://help.salesforce.com/s/articleView?id=000321501&type=1" this article and they mention If your org is not on a Public Cloud instance and you would prefer not to allow Public Cloud IP ranges, you do not need to allow Public Cloud (Canada, Australia) IP ranges. And also they have mention 
Please be reminded that our best practice and recommendation is to allow the entire list of Salesforce IP ranges for seamless access.
Which create confusion so can you help me in this Do I need to mention IP range under APNIC, Australia (Public Cloud) and RIPE region even my instance is located at America region  ?
Best Answer chosen by Yash Kumar Gupta
SwethaSwetha (Salesforce Developers) 
HI Yash,
As you rightly pointed out from the documentation, the best practice is to whitelist the entire set of provided IP ranges. This is to avoid unintended service disruptions.

However, as you only want to allow the American region, add ARIN IP ranges.

IPv4 NetworkIPv4 IP Range
ARIN - - - - - - - - - - - - - - -

To be double sure, you can try to test what IP ranges Salesforce uses for your location and try whitelisting only them.

If this information helps, please mark the answer as best. Thank you
Lightning AccountLightning Account 
What is meant by Trailhead in Salesforce. What is the use of it and What is the use of getting points in Trailhead. Please explain and provide details. Thank you!
Best Answer chosen by Lightning Account
SwethaSwetha (Salesforce Developers) 
Trailhead is an interactive learning platform.Trailhead consists of three basic parts
  • Trails
  • Modules
  • Units

Trails are virtual paths that help a user learn a certain concept or technology by aggregating different modules.

Each module covers one topic, and it's made up of one or more units that both teach and evaluate a subject. A Module can be present in more than one Trail.

By completing Trails and Modules one earns badges (or Superbadges, in certain cases) that help showcase the user's knowledge.

Link: https://trailhead.salesforce.com/today

If this information helps, please mark the answer as best. Thank you
inbox outbox 7inbox outbox 7 
I am actually looking for an answer, kind of like a skeleton, so that I can modify the answer based on what I do.
I am preparing to attend interviews.

How do I answer the following questions as a developer:
What is the deployment strategy in your company?
What is your role in deployment (both in lower and as well as higher environments)?
Best Answer chosen by inbox outbox 7
Sai PraveenSai Praveen (Salesforce Developers) 

Generally it depends on the organization which you work. As per my experiencce till QA we will be merging the code and deploy the code till QA. and from then release team will handle the deployment. 

As per my experience we used to develop in Dev and move the code to QA and once it is passed then we move to INT and then perform regression testing ... etc there.

Anastasiya Komar 8Anastasiya Komar 8 


I need to add gift cards to an opportunity if the checkbox is enabled, otherwise it will throw an error. In this case, the entered card is deactivated. In the future, I don't have the ability to change any of the opportunity field as the validation fires. How can I solve this problem?
public class OpportunityTriggerHandler {
         public void afterInsert (List<Opportunity> newOpportunities){
            List<String> cardNames = new List<String>();
            for(Opportunity oppItem : newOpportunities) {
            List<Gift_Card__c> giftCardToUpdate = [SELECT Active__c, Amount__c, Name 
                                                  FROM Gift_Card__c 
                                                  WHERE Name IN :cardNames];    
            for(Gift_Card__c giftCard: giftCardToUpdate ) {
                giftCard.Active__c = false;
            update giftCardToUpdate;
        public void beforeInsert (List<Opportunity> newOpportunities){
            List<String> cardNames = new List<String>();
            for(Opportunity oppItem : newOpportunities) {
            List<Gift_Card__c> allGiftCards = [SELECT Active__c, Amount__c, Name 
                                           FROM Gift_Card__c 
                                           WHERE Name IN :cardNames];
            for (Opportunity newOpp: newOpportunities) {
                for(Gift_Card__c giftCard: allGiftCards ) { 
                        if (giftCard.Active__c == true) {
                        newOpp.Amount -= giftCard.Amount__c;
                     } else {
                     newOpp.Gift_Card__c.addError('Gift Card is inactive');

Best Answer chosen by Anastasiya Komar 8
Maharajan CMaharajan C
Hi Anastasiya,

can you please elaborate your concern little bit more so we can help you much easily... Because am seeing you have already written some code...

Best Answer chosen by Justin Thompson 9
Maharajan CMaharajan C
Hey Justin, You can't grey out the field only you can throw the validation msg using standard functionalities.

Nimisha Rajshri 7Nimisha Rajshri 7 
We are facing thie error on Account detail page in Lightning experience because of which I cannot see any fields on the accounts pagelayout. However, I can see the fields on details page for Accounts in classic. 

ui.services.connection.api.PartnerConnectionException: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 14994162-106344 (-1574478963)

I don't understand this error id. anyone else facing the same issue?
Best Answer chosen by Nimisha Rajshri 7
SwethaSwetha (Salesforce Developers) 
I see below details in the logs for org (00D8K0000004eOQ)
java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected DATE UNIT got NUMBER
Record Id : 001F0000010jF4rIAE
Please also review the associated SOQL query

Also, you might want to recheck the timezone as it is
26 May 2022, Pacific Time (PT) 9:17 am at the time of writing this comment :) 

Hope this helps.Thank you
Best Answer chosen by Sanket Jadhav 15
AnkaiahAnkaiah (Salesforce Developers) 
Hi Saket,

A standard object has a standard tab already by default. You control the visibility at the profile level whether this tab is visible at all. Custom objects, you have control whether you create a tab for that object or not as it's "custom".
You'd have to create a Lightning/VF page tab if you'd like to do something completely custom at a standard object level through a tab.

Refer the below link


If this helps, Please mark it as best answer.

Prashant GulvePrashant Gulve 
Hi Team Need your Help on this trigger detail info provide please help..

On this trigger while creatig new contact record when i select Child Sham record on 'Account Name' field then Parent website getting auto populate on contact website but when i Select Parent Account Ram in contact 'Account Name' filed then it's showing Contact Website field blank. so it should reflect parent website in both scenario. Below is details
[when ever new contact record will created parent account website filed should get update on contact. even if child selected]

Created a trigger on Contact object (before update) to auto populate  Website__c field on creation of New Contact record. on update of Account Parent -Account-Website field and Child Account Website field.
1- I have created Website Field in both account and conatct object data type URL
2- Account Parent Record created. e.g- Ram and website filed updated www.Ram@pareant.com
3- Account Child record created. e.g- Sham and Parent account name is Ram selected website updated www.sham@child.com
4- On New Contact creation always Pareant Account Website should get display on contact object. e.g- www.Ram@pareant.com  even if we select Sham on contact object Account name field still www.Ram@pareant.com should get display on Contact object website filed.
trigger WebsiteAutopopuoonContactTrigger on Contact (before insert) {
public class WebsiteAutopopuoonContact {
    public static void createWebsite(List<Contact> contList) {
       Set<Id> accSet = new Set<Id>();
        for(Contact Con : contList) {
        List<Account> accList = [Select Id
                                       , Name
                                        , Website
                                         , Account.Parent.Website
                                 from Account where Id IN:accSet];
        map<Id, String> idvswebsite = new map<Id, String>();
        for(Account acc : accList){
            idvswebsite.put(acc.id, acc.Parent.Website);
        Map<Id,Contact> conNameKeys = new Map<Id,Contact>();
        for(Contact Con : contList) {
            conNameKeys.put(Con.AccountId, Con);
            Con.Website__c = idvswebsite.get(Con.AccountId);
Best Answer chosen by Prashant Gulve
AnkaiahAnkaiah (Salesforce Developers) 
Hi Prasanth,

try with below code.
trigger WebsiteUpdate on Contact (before insert,before update) {
    set<id> accids = new set<id>();
    if(trigger.isbefore && (trigger.isinsert || trigger.isupdate)){
    for(contact con:trigger.new){
        if(con.accountid != NULL){
    map<id,account> accmap = new map<id,account>([SELECT id,parentid,website__c,parent.Website__c from account where ParentId!=Null AND id=:accids]);
    map<id, string> parentaccmap = new map<id,string>();
    for(account acc: accmap.values()){
    for(contact con:trigger.new){
        for(Account acc :accmap.values()){
            if(con.accountid==acc.id && parentaccmap.containsKey(acc.ParentId) ){
                con.Website__c = parentaccmap.get(acc.ParentId);


If this helps, Please mark it as best answer.

shimy josshimy jos 
whenever an invoice(Invoice__c is the custom object) is created ,the opportunity status must change to open .How can i do using validation rule?
Best Answer chosen by shimy jos
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Shimy,

Can you try the below validation rule as you said in the question the validation should fire only when created so included isnew().
AND(ISNEW(),Text(Opportunity__r.Status__c) <>'Open')

Best Answer chosen by Amar123
Prateek Prasoon 25Prateek Prasoon 25
String SobjectApiName = 'Contact'; Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); Map<String, Schema.SObjectField> fieldMap = schemaMap.get(SobjectApiName).getDescribe().fields.getMap(); for(String fieldName : fieldMap.keyset() ) { system.debug('fieldName->>'+fieldName); // This will give you the api name of the field name. }