+ Start a Discussion
ethanoneethanone 
Any idea how to move old notes to the new enhanced notes and maintain the original owner/creator and date/time?
Best Answer chosen by ethanone
JustAGirlyGeekJustAGirlyGeek
Hi ethanone,

Here is a knowledge article on how to import notes into the ContentNote (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentnote.htm) object:

https://help.salesforce.com/apex/HTViewSolution?id=000230867&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000230867&language=en_US)

In order to over-ride the system fields in SF on import (won't work on editing records), you need to follow this knowledge article to enable the 'create audit fields' feature:

https://help.salesforce.com/apex/HTViewSolution?urlname=Enabling-Create-Audit-Fields&language=en_US (https://help.salesforce.com/apex/HTViewSolution?urlname=Enabling-Create-Audit-Fields&language=en_US)
https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-specify-the-values-in-Created-By-Created-Date-Last-Modified-By-ID-Last-Modified-Date&language=en_US (https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-specify-the-values-in-Created-By-Created-Date-Last-Modified-By-ID-Last-Modified-Date&language=en_US)

Lastly, this object isn't listed as one of the objects you can set the values for system fields but I haven't tested it to know for sure (it is a newer object):

https://help.salesforce.com/apex/HTViewSolution?urlname=Considerations-before-having-Create-Audit-Fields-enabled&language=en_US (https://help.salesforce.com/apex/HTViewSolution?urlname=Considerations-before-having-Create-Audit-Fields-enabled&language=en_US)

Hope this helps!
sri sfdcsri sfdc 
Hi ,

I have pick list values like 1,2,3,4,.....20 . There are 5 useres. user1 can see 2,3,4,5 values and U2 can see 1,5,6, values. Like that other users can see different pick list values. How can I achive this. 

Thanks
Best Answer chosen by sri sfdc
Maharajan CMaharajan C
Hi Sri,

Sorry for the late reply,

Unless using the Record types or vf page you can't Control the picklist based on the user's(i.e Users profiles).

your question is good but that 50 users are comes under the 5 to 10 profiles right.Here the record type are associated with the users profiles not with the users.so you no need to worry about creating 50 record types because we are only going to create 5 to 10 record types.

My another suggestion is you to creating a validation rule to stop the users to edit the other users picklist But you can't stop the users seeing the Full Picklist Values only you can control the access.

The VR Formula Like below:

AND( $Profile.Id = "15 Digit Profile ID of User", NOT(ISBLANK(TEXT(Picklist_Field__c))), TEXT(Picklist_Field__c)<>"Option1", TEXT(Picklist_Field__c)<>"Option2" )

Let me know if you want any further help.

If those points are help means mark these as a best answer.

Thanks,
Raj
(Sweet Potato Tec)



 
Connie SintsoConnie Sintso 
The challenge is:

You've been given a requirement to keep Contact addresses in sync with the Account they belong to. Use Process Builder to create a new process that updates all child Contact addresses when the address of the Account record is updated. This process:Can have any name.
Must be activated.
Must update Contact mailing address fields (Street, City, State, Post Code, Country) when the parent Account shipping address field values are updated.

I start with Accounts when records is created or edited.
Filter criteria where accounts shipping address (street, city, state, zip code) is changed (used "or" logic).

I am stuck on the next step "add action".  I started with action type "Update Records".
On objects, I can't seem to change Accounts to Contacts.  Why?
Best Answer chosen by Connie Sintso
Shailesh DeshpandeShailesh Deshpande

Step1: steup > Create > Workflows&Approvals > Process Builder >New > Name your Process

User-added image

Step2: Choose Object and Specify When to Start the Process > Account & Start the process > when a record is created or edited

User-added image

Step3: Define Criteria for this Action Group > Criteria Name > Is Billing Address Changed & Criteria for Executing Actions > (Select)Filter conditions are met. Next Set Filter Conditions as shown in screenshot

User-added image

Step4: IMMEDIATE ACTIONS > update Records > Action Name > Update Billing Address > Object (SELECT==> [Account].Contacts) as shown in screen shot & Set Object Variables (Field mapping)

User-added image

Step5: Acitvate the Process
Ankit SehgalAnkit Sehgal 
I want to record all my call logs on my android smartphone in my salesforce org. on a daily basis. Do i need to create a native android app for that ? What are the requrements to implement such functionality ? 
Best Answer chosen by Ankit Sehgal
Hari hara suthanHari hara suthan

Hi Ankit,
You can achive this by creating Native or Hybrid android app.
Easiest way is creating hybrid app through forcedroid (https://www.npmjs.com/package/forcedroid) hybrid_local app.
Then include ionic-salesforce starter (https://github.com/driftyco/ionic-starter-salesforce)
Use cordova contact plugin to import device contacts (https://github.com/apache/cordova-plugin-contacts)
Enable background mode by adding cordova plugin (https://github.com/katzer/cordova-plugin-background-mode)
Write logic to do a contact import and save those records in salesforce.

Thanks,
Hari

Wesley HWesley H 
We are attempting to move a simple Apex Class and Apex Test Class from Sandbox to Production, and blocked by Code Coverage Failure error. Our Code Coverage is showing 100% in Production (via Developer Console), yet we are seeing a Code Coverage Failure Error (coverage = 33%) even on "Validate" (not "Deploy") of non-apex change set. We have followed instructions in Knowledge Article 000335222 (https://help.salesforce.com/articleView?id=000335222&type=1&mode=1) carefully to reset Code Coverage numbers and are still seeing the above error on validation of non-apex change set as well as on attempt to deploy an apex-loaded change set including test class. Apex Class and Apex Test Class code below for reference, any help greatly appreciated!
 
Public class AutoConvertLeads
{
    @InvocableMethod
    public static void LeadAssign(List<Lead> LeadIds)
    {
        LeadStatus CLeadStatus= [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true Limit 1];
        List<Database.LeadConvert> MassLeadconvert = new List<Database.LeadConvert>();
        for(Lead currentlead: LeadIds){
                Account[] matchedaccount = [SELECT Id, Name FROM Account WHERE Name=:currentlead.Company LIMIT 1];
                if(matchedaccount.size() > 0) {
                Database.LeadConvert Leadconvert = new Database.LeadConvert();
                Leadconvert.setLeadId(currentlead.id);                
                Leadconvert.setConvertedStatus(CLeadStatus.MasterLabel);
                Leadconvert.setDoNotCreateOpportunity(TRUE); //Remove this line if you want to create an opportunity from Lead Conversion
                Leadconvert.setAccountId(matchedaccount[0].id);
                MassLeadconvert.add(Leadconvert);
                }
        }
        
        if (!MassLeadconvert.isEmpty()) {
            List<Database.LeadConvertResult> lcr = Database.convertLead(MassLeadconvert);
        }
    }
}

And Test Class:
@isTest 
      public class TestAutoConvertLeads{
      static void createnewlead(){
      User userToCreate = [SELECT id FROM user WHERE profile.name='System Administrator' Limit 1];
      
      Test.startTest();    
      Lead leadToCreate =new Lead();
      List<Lead> LeadIds= New List<Lead>();
      leadToCreate.ownerid= userToCreate.id;
      leadToCreate.LastName ='Gupta';
      leadToCreate.Company='Salesforce';
      insert leadToCreate; 
      LeadIds.add(leadToCreate);
      
      LeadStatus CLeadStatus = new LeadStatus();
      
      Account AccountToCreate = new Account();
      AccountToCreate.ownerid= userToCreate.id;
      AccountToCreate.Name = 'Salesforce';
      insert AccountToCreate; 
      
      AutoConvertLeads.LeadAssign(LeadIds);
      
      Test.stopTest();
   }
}

 
Best Answer chosen by Wesley H
Wesley HWesley H
@Abdul, Development Mode NOT checked (and wasn't before).

@Andrew, thanks, but already been down that road.

However...I found the issue: somehow my test class was missing a test method (line 3 of my test code above), so it was passing with 0/0 tests in sandbox (100%!) but bombing in the change set to Production. I fixed line 3 to read, "static testMethod void createnewlead(){" and I got 1/1 tests (also 100%) in sandbox and a flawless deployment to Production. Sorry that was so elementary, but thank you all for your help!
JPSeaburyJPSeabury 

Working on the Lightning Experience Reports & Dashboards Specialist superbadge, I'm at Challenge #7 (Create the SolarBot dashboard) and getting the following error:


There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: IWVYGERW

This is a new trailhead org, created excusively for completing this bage (no other Trailhead modules have been worked in this org). I had a similar unexpected error in a different org, on my previous superbadge -- also when creating dashboards, and corrected it by doing a dashboard refresh. Tried the same thing here, to no avail. Even with a freshly "refreshed" dashboard, I get the error. 

Any suggestions? Could not find the IWVYGERW error code in discussion forum searches.

Best Answer chosen by JPSeabury
NagendraNagendra (Salesforce Developers) 
Hi Seabury,


Sorry for this issue you are encountering.

If you are using a brand new developer org then please double check that your org doesn't have a namespace enabled.\

If the problem continues,  log out of all accounts and log in once again in a different browser by clearing the cache and cookies which should probably do the trick.

Follow the below steps which might help you pass the challenge.
 
  • SolarBot Pipeline by Stage:
Report: SolarBot Loyalty Revenue
Component Type: Vertical Bar
Tip:Max Groups Displayed = 9
  • Case Drivers and SolarBot Ownership:
Report: Top Case Drivers by SolarBot Ownership
Component Type: Vertical Sack Bar
Tip: Stack to 100%
  • Temperature and Kilowatt Hour Relationship:
Report: Temperature to kWh Research
Component Type: Line Type
Tip:X Axis=Temperature Range and SolarBot Model
Y Axis=Average KiloWatt Hours
  • SolarBot Evangelism Countdown:
Report: Accounts without SolarBot Opportunities
Component Type: Gauge Type
Tip: Careful the Segment Range Setting
  • Opportunity Overview:
Report: SolarBot Loyalty Revenue
Component Type: Lightning Table
Tip: Set Prospecting first on the list stage opportunities

For more information check with below link.
Please let us know if any further help is needed.

Kindly mark this as solved if the reply was helpful so that it gets removed from the unanswered queue which results in helping others who are facing a similar issue.

Thanks,
Nagendra
Emilien Guichard 40Emilien Guichard 40 
Hi,

I am stuck at the Create and Train the Dataset step on the Build a Cat Rescue App That Recognizes Cat Breeds Trailhead module.

I have successfully created the lightning component, uploaded the zip file and clicked on the train button but when I try to Verifiy I get the following error message:
"Challenge Not yet complete... here's what's wrong: 
Could not find a successful cat dataset training. The training may take a couple of minutes after the model is created."

Could you please advise ?

Thanks for your help.
Best Answer chosen by Emilien Guichard 40
muenzpraegermuenzpraeger
Let's do a quick'n'dirty approach: delete and re-upload the dataset. Once you see the dataset labels with their respective numbers (like in your screenshot, you may have to "refresh datasets") run the training again. Wait approx. 1-2 min. Then verify the challenge.
StephenDicksonStephenDickson 
I created a trigger to update a custom field (Mailing County) before insert of a Contact.  The trigger takes the MailingPostalCode entered by the user and finds the County in which that zip code is found.  This is done via a custom object (Zip_Code__c) in which the Postal Codes are stored along with their respective Counties.

I would love any feedback on how to make this trigger better, but specifically I am confused because one of my test methods is not working (TestContactWithValidZip).  This particular test gets caught by my addError clause of my trigger.

Trigger:
trigger CountyLookupByZip on Contact (before insert) {
    for (Contact c : Trigger.New) {
        if(c.MailingPostalCode != null) {
        	List<Zip_Code__c> contactCounty = new List<Zip_Code__c>();
            contactCounty = [SELECT Id,
                                County__c,
                                Postal_Code__c
         				 FROM   Zip_Code__c 
        			     WHERE  Postal_Code__c = :c.MailingPostalCode];
            if(contactCounty.size() != 0){
            	c.Mailing_County__c = contactCounty[0].County__c;
            } else {
                c.MailingPostalCode.addError('Postal Code not found. Please ensure the postal code is a valid Virginia zip code.');
            }
        }
	}
}
Test Clas:
@isTest
public class TestCountyLookupByZip {

    @isTest
    public static void TestContactWithNullZip() {
        // Test data setup
        // Create a contact without a Mailing Postal Code
        // and check to ensure County is also null
        Contact contactNullZip = new Contact(LastName = 'Test');
        insert contactNullZip;
        
        // Perform Test
        System.assertEquals(contactNullZip.Mailing_County__c, null);
    }

    @isTest
    public static void TestContactWithValidZip() {

        // Test data setup
        // Create a contact with a valid VA Mailing Postal Code
        // and check to ensure County is updated correctly
        
    	Contact contactValidZip = new Contact(LastName = 'Test', MailingPostalCode = '20101');
        insert contactValidZip;
        
        // Perform Test
        System.assertEquals(contactValidZip.Mailing_County__c, 'Loudoun');
    }   
    
    @isTest
    public static void TestContactWithInvalidZip() {
        // Test data setup
        // Create a contact with an invalid Mailing Postal Code
        // and throw an error
        Test.startTest();
        try {
       		Contact contactInvalidZip = new Contact(LastName = 'Test', MailingPostalCode = '17602');
        	insert contactInvalidZip;
        // Perform Test
        } catch(Exception e) {
			System.Assert(e.getMessage().contains('FIELD_CUSTOM_VALIDATION_EXCEPTION'));
            System.Assert(e.getMessage().contains('Postal Code not found. Please ensure the postal code is a valid Virginia zip code.'));
        }
        Test.stopTest();
    }
}


 
Best Answer chosen by StephenDickson
Andrew GAndrew G
Hi Stephen
You still get the error as you have not re-queried the record that you have created.  
If you go to this thread  https://developer.salesforce.com/forums/ForumsMain?id=9062I000000IKZFQA4
and search for "why we grab the written record in our Apex Test Classes" you will see a post that will explain what is required and why.

But if you want the short version, update your method to:
@isTest
    public static void TestContactWithValidZip() {

        // Test data setup
        // Create a contact with a valid VA Mailing Postal Code
        // and check to ensure County is updated correctly
        Zip_Code__c zipCode = new Zip_Code__c(Postal_Code__c = '20101', County__c = 'Loudoun');
        insert zipCode;
        
    	Contact contactValidZip = new Contact(LastName = 'Test', MailingPostalCode = '20101');
        insert contactValidZip;
        Contact insertedContact = [SELECT Id, Mailing_County__c FROM Contact WHERE Id = :contactValidZip.Id  LIMIT 1];
        
        // Perform Test
        //general format for asserts is expected v actual so 
        System.assertEquals('Loudoun', insertedContact.Mailing_County__c, );
    }

Regards
Andrew
Best Answer chosen by SS Karthick
jeniffer homesjeniffer homes
You either acquire this card in person, mail or lists. You have activities related to the lead development which will include calls, sending materials and possible meetings. A lead has a life cycle with lead stages and status.
Regards,
Jeniffer.
Website:- (http://www.contacttelephonenumbers.com/)
Best Answer chosen by KMK91
Always ThinkinAlways Thinkin
The Opportunity object connects Accounts to Products. Products are organized in Pricebooks and selected as Opportunity Line Items to create a list of items the customer wants to buy. The Opportunity is also related to Forecasts through the Stage and Percentage fields. This helps predict Opportunities that are going to be "Closed Won". Closed Won Opportunities are those that the customer has agreed to buy all the products. 

Many Opportunities can be created for one Account if the customer is interested in different packages of products. For new customers, typically the Opportunity is created when the new customer is converted from a Lead to an Account (and Contact too).

Please explain what further information will help you.