+ Start a Discussion
Vijayakumar KenchugunduVijayakumar Kenchugundu 
Hello Friends,

Your thoughts on my issue is highly appreciable. 
The scenario what I am trying to do here using Process Builder is updating child accounts when there is update on Parent account.
I have a custom picklist field Org Type (not used global picklist value set) on Account object. I am trying to set this value to all child accounts in the hierarchy where there is update the same field on Parent account.
I tried all these methods.
1st: I tried directly mapping field reference field [Account].Parent.Organization_Type__c to child account field. 
2nd: Used a formula with CASE (shown below) using both TEXT([Account].Parent.Organization_Type__c) and withouth TEXT. 

CASE(TEXT([Account].Parent.Organization_Type__c),
"Sole Proprietorship", "Sole Proprietorship",
"Partnership", "Partnership",
"Unincorporated", "Unincorporated",
"Limited Liability Company", "Limited Liability Company",
"Other", "Other",
"")

The issue is the custom picklist field update on Parent is not at all updating on child records. Am I doing something wrong here?
Best Answer chosen by Vijayakumar Kenchugundu
Vijayakumar KenchugunduVijayakumar Kenchugundu
Oh my bad. I over complicated by adding ParentId in Field Reference. I changed and just considered direct Account fields, it worked even without using Formula.
[Account].Parent.Organization_Type__c (DID NOT WORK)
[Account].Organization_Type__c (WORKED PERFECT)
 
YiQin HeYiQin He 
Hi, 

I created a lightning component as a quick action button. In the component, I have a cancel button that I want it closed when user clicks.
User-added image

But the problem is that I cannot find any document explain how to close the modal dialog. This is the ui code:
<aura:component controller="ContactController" implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" >
    <style>
        .changeRecordTypeRow {
        margin-top: 1.5rem;
        margin-bottom: 0;
        margin-left: 0;
        margin-right: 0;
        }
        
        .changeRecordTypeLeftColumn {
        float: left;
        text-align: right;
        padding-right: 1.5rem;
        width: 35%;
        font-size: .8125rem;
        color: rgb(84, 105, 141);
        }
        
        .changeRecordTypeRightColumn {
        float: right;
        text-align: left;
        width: 65%;
        }
        
        .modal-body
        {
        	height:auto !important;
        	padding:0;
        }
        
        .forceChatterLightningComponent .bodyWrapper{height:100%;width:100%;padding:0;box-sizing:border-box}
    </style>
    <div class="modal-header slds-modal__header">
        <h2 class="title slds-text-heading--medium" >Change Contact Type</h2>
    </div>
    <div class="scrollable slds-modal__content slds-p-around--medium">
        <div class="changeRecordTypeRow">
            <fieldset class="slds-form-element">
                <div class="changeRecordTypeLeftColumn">
                    <legend class="form-element__legend slds-form-element__label">Select a record type</legend>
                </div>
                <div class="changeRecordTypeRightColumn slds-form-element__control">

                    <span class="slds-radio">
                        <input type="radio" id="radio_PrimaryContact" name="recordType" />
                        <label class="slds-radio__label" for="radio_PrimaryContact">
                            <span class="slds-radio--faux"></span>
                            <span class="slds-form-element__label">Primary Contact</span>
                        </label>
                    </span>
                    <span class="slds-radio">
                        <input type="radio" id="radio_SecondaryContact" name="recordType" />
                        <label class="slds-radio__label" for="radio_SecondaryContact">
                            <span class="slds-radio--faux"></span>
                            <span class="slds-form-element__label">Secondary Contact</span>
                        </label>
                    </span>
                </div>
            </fieldset>
        </div>
	</div>
    <div class="modal-footer slds-modal__footer">
    	<div class="forceChangeRecordTypeFooter">
        	<button type="button" class="slds-button slds-button--neutral .slds-modal__close" aura:id="btnCancel" >
            	Cancel
            </button>
            <button type="button" class="slds-button slds-button--brand" aura:id="btnSave">
            	Save
            </button>
        </div>
    </div>
</aura:component>
Does anyone have similar experience? Thanks in advance.
Best Answer chosen by YiQin He
YiQin HeYiQin He
Hi Karthik,

Thanks for the reply. I've already found the solution.
Call this method $A.get("e.force:closeQuickAction").fire() will close the modal dialog.

Yiqin
Spencer_BerkSpencer_Berk 
I am trying to install the Marketing Cloud for Nonprofits app but I'm recieving the following deployment error: Key Error: "rest_instance_url". I couldn't find anything on google. Any suggestions on how to fix?
Best Answer chosen by Spencer_Berk
SwethaSwetha (Salesforce Developers) 
HI Spencer,
This error is specific to the package you are trying to install. The package's internal details are not visible to the subscribers(end users). Therefore you will need to reach out to the package provider with the error details so they can help with the fix.

On a general note,"rest_instance_url" is one of the response parameters when Marketing Cloud returns an access token
Reference: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/access-token-s2s.html#access-token-request
rest_instance_url : Your tenant’s REST base URL for making REST API calls.
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Pooja NekkalapudiPooja Nekkalapudi 
How to auto -populate user look up field on the case object? using the Web Email field on case object
I have a web email or SuppliedEmail standard fiel which holds the email address of the user 
Using this field I want to auto populate the respective user lookup
 
Best Answer chosen by Pooja Nekkalapudi
R Z KhanR Z Khan
trigger CaseTrigger on Case(before insert, before update){
List<String> emails = new List<String>();     
Map<String, Id> userEmailToIDMap  = new Map<String, Id>();

for(Case c: trigger.new){
     emails.add(c. SuppliedEmail);
     }
List<USer> users = [SELECT Id, Email from user where Email IN :emails];
for(User u : users){
       userEmailToIDMap.put(u.Email, u.Id();
}

for(Case c:trigger.new){
if(userEmailToIDMap.get(c.SuppliedEmail) != null){
    c.Owner = userEmailToIDMap.get(c.SuppliedEmail);
{
}

}
Somya TiwariSomya Tiwari 

I have set Default value for a Picklist, but to my luck it is not working, don't know the reason for the same.

Can anyone help me with any workaround? Even Custom Picklists are not working with default values on Account. Although it is working for Contact. 

Default Value:
User-added image

New Account Page:
User-added image
 

Best Answer chosen by Somya Tiwari
Khan AnasKhan Anas (Salesforce Developers) 
Hi Somya,

Greetings to you!

You have record types enabled for Account. Each record type has its own Default. You have to set the default under each record type. 
Go to Setup -> Object Manager -> Account -> Record Types -> Open Record Type - Not Edit -> Picklist value to set default

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Andrew Thompson 18Andrew Thompson 18 
I'm using a free developer account with Trailhead but there is no option to switch to Lightning as described in the modules. Am I missing something obvious?

User-added image

 
Best Answer chosen by Andrew Thompson 18
NagendraNagendra (Salesforce Developers) 
Hi Andrew Thompson 18,

If you want to switch from salesforce classic to lightning experience please find the below navigation and screenshots.

User-added image

Click on the lightning Experience button which is given in the above screen shot.

Lightning Experience==>A new window opens==>Come to the bottom of the page ==>Enable lightning experience feature

After enabling the lightning experience now come to your user name on the top right of the screen, under developer console you find an option of switch to lightning experience as shown below.

User-added image


Please mark my solution as the best answer if it helps you.

Best Regards,
Nagendra.P

 
Lokesh BoganathamLokesh Boganatham 
Hi guys, When i am starting to connect my org and visualforce, i am getting the below error.

Starting SFDX: Authorize an Org
22:50:06.500 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
22:50:06.501 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
 ended with error spawn C:\WINDOWS\system32\cmd.exe ENOENT



I am following this document for setup. please help
Best Answer chosen by Lokesh Boganatham
Lukesh KarmoreLukesh Karmore
hello Lokesh,
Please Refer this video it solve my issue,  follow full procedure : https://www.youtube.com/watch?v=pRkcutdeMfY&t=934s
Hope it solve your query and mark the best so it help others.
Thanks
Shruthi GM 6Shruthi GM 6 
"Your Apex code contains field level access checks that are redundant now that you've added 'WITH SECURITY_ENFORCED'. Please check your code again."

Code is:-

@RestResource(urlMapping='/secureApexRest')
global with sharing class SecureApexRest {
    @HttpGet
    global static Contact doGet(){
        Id recordId = RestContext.request.params.get('id');
        Contact result;
        if (recordId == null){
            throw new FunctionalException('Id parameter is required');
        }
        if (Schema.SObjectType.Contact.isAccessible()
            && Schema.SObjectType.Contact.fields.Name.isAccessible()
            && Schema.SObjectType.Contact.fields.Secret_Key__c.isAccessible()){
            List<Contact> results = [SELECT id FROM Contact WHERE Id = :recordId WITH SECURITY_ENFORCED];
            if (!results.isEmpty()) {
                result = results[0];
            }
        } else{
            throw new SecurityException('You don\'t have access to all contact fields required to use this API');
        }
        return result;
    }
    public class FunctionalException extends Exception{}
    public class SecurityException extends Exception{}
}

Kindly suggest me what exactly I need to change in the code.
Thanks inadvance.
Best Answer chosen by Shruthi GM 6
Raj VakatiRaj Vakati
Refer this link 
https://success.salesforce.com/answers?id=9063A000000lSPsQAM

You dont have to provide access to any fields. If you read the challenge, you just have to edit the query to include the new WITH SECURITY_ENFORCED attribute, and remove other field level security checks. 

You need to put the query in a try/catch statement, and catch the System.Query Exception.

Use this code
 
@RestResource(urlMapping='/secureApexRest')
global with sharing class SecureApexRest {
    @HttpGet
    global static Contact doGet(){
        Id recordId = RestContext.request.params.get('id');
        Contact result;
        if (recordId == null){
            throw new FunctionalException('Id parameter is required');
        }
        List<Contact> results;
        try{
            results = [SELECT id, Name, Secret_Key__c FROM Contact WHERE Id = :recordId WITH SECURITY_ENFORCED];
        }catch(QueryException e){}
        
        if (!results.isEmpty()) {
                result = results[0];
        }
        return result;
    }
    public class FunctionalException extends Exception{}
    public class SecurityException extends Exception{}
}

 
Manj_SFDCManj_SFDC 
Hi everyone,

I am completed the Multiple choice questions for Platform Developer 2 as well as the  super badges, can someone help me to understand how do I get the certificate.
Thanks
Best Answer chosen by Manj_SFDC
Amit Chaudhary 8Amit Chaudhary 8
Please check below post. That will help you
1) http://certification.salesforce.com/platformdeveloperII
2) http://certification.force.com/pkb/articles/Public_KB/Changes-to-Platform-Developer-II

Congrats - you’re on the path to earning PDII! What happens next? In order to grant you the PDII credential, we’ll need to link your Webassessor and Trailhead accounts. Here’s the process:

Step 1 - Link Your Accounts: Once you complete the requirements in Trailhead, we will send you an email with instructions on how to link your accounts. Click here  (http://certification.force.com/pkb/articles/Public_KB/Link-Your-Trailhead-and-Webassessor-Accounts)for more details about this process.

Step 2 - We Grant You the Credential: Once you’ve successfully linked your accounts, and you’ve completed all requirements for PDII, we will grant you the credential within 1 week. You will receive an email notification with your certificate and logo which you can then proudly display!
Note: Your credential certified date will reflect the date your credential was issued in Webassessor.

 
Vaibhav ShettiVaibhav Shetti 
I need to fetch ListViews and related filters, say for Account object. I know StandardSetContoller has methods - getListViewOptions() and getFilterId() methods which are helpful. However, the maximum record limit for StandardSetController is 10,000 records. In my case there are records more than 10,000. How do I implement this so that I can handle records more than 10,000?
Best Answer chosen by Vaibhav Shetti
Shruti SShruti S
Unfortunately I don't think there is a way to do this. The limitation of the StandardSetController is a hard and fast limit of 10K. We cannot do anything.

I think you will have to use the REST API to access the SOQL behind a list view and build our own UI.

Here is an Apex Class - https://github.com/shrutis22/Record-Lookup/blob/master/src/classes/ListViewAPI.cls that I used a long ago to accomplish this.

Using the Apex Class + REST API, you can get the SOQL query behind the LIST VIEW. You can then use OFFSET and LIMIT to show more records.