• VISHAL SARASWAT
  • NEWBIE
  • 30 Points
  • Member since 2019

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
I created a link for pdfs stored in files on the Opportunity record. When I switch to lightning and click on the link, salesforce is directly downloading them instead of viewing them?
How can I view the pdfs instead of downloading?
Thank you!
I have an active user that has a customer community license.  That user is able to own contact records, but I can't seem to change ownership of an account to that user.

In the documentation, I found this statement: "Community Users can't own community-enabled accounts".  Is that my issue?  What does it mean for an account to be "community-enabled"?  Is there a work-around?  My goal here is to have a community licensed user that can own accounts that are outdated/inactive.

Thanks,

- Randy Trigg
  • September 17, 2019
  • Like
  • 1
I created a link for pdfs stored in files on the Opportunity record. When I switch to lightning and click on the link, salesforce is directly downloading them instead of viewing them?
How can I view the pdfs instead of downloading?
Thank you!
I don't know why, but Trailhead does not see that I've setup a user Samantha Cordero with the profile Field Sales User. I've create the Field Sales User profile, created the user Samantha Cordero, activate the user, generate a password, and logged in as the user. I even logged in as her in Salesforce 1, but I still get this message:
error message
Here is what her user detail page:
User-added image
Field Sales User profile:
User-added image
Here is the Question


Create an Apex class that implements the Schedulable interface to update Lead records with a specific LeadSource. Write unit tests that achieve 100% code coverage for the class. This is very similar to what you did for Batch Apex.
Create an Apex class called 'DailyLeadProcessor' that uses the Schedulable interface.
The execute method must find the first 200 Leads with a blank LeadSource field and update them with the LeadSource value of 'Dreamforce'.
Create an Apex test class called 'DailyLeadProcessorTest'.
In the test class, insert 200 Lead records, schedule the DailyLeadProcessor class to run and test that all Lead records were updated correctly.
The unit tests must cover all lines of code included in the DailyLeadProcessor class, resulting in 100% code coverage.
Run your test class at least once (via 'Run All' tests the Developer Console) before attempting to verify this challenge.


Here is my code so far

global class DailyLeadProcessor implements Schedulable {

    global void execute(SchedulableContext ctx) {
        list<leads>Lead = [select leadSource from lead where isnull= true]
        
         for (Integer i = 0; i < 200; i++) {
            Leads.add(new lead(
                name='Dream force'+i
            ));
        }
        insert Leads;
    }

I am not sure what is wrong here