• Jefferson Escobar
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Salesforce Technical Lead | Architect


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 10
    Replies
Hi,

We have detected that sometimes the users are not able to work in some functionalities because we are triggering several times deployment process for Bugfixing/Hotfixing. As far I know. there is should not be an issue in the regular work during a deployment in progress but based on this fact, seems there is an impact in the operativity in the org for the users.

Really appreciate yours thoughts/insights here.


Thank you,
Jeff
 
Hi all,

We are trying to show information through a community which contains data from Account object. As you may know there is profile for a guest user who can access to Salesforce externally and allow external customers navigating to our community, the thing we want to extend the access for query some accounts (Stores in our cases) but  I am concerned about the security by allowing access to the account object (even read-only) for people with public access to the site. We are thinking to create a specific object to replicate the information which is only needed from Account and then enable public access Read-Only to that one.

What would you consider the best approach to full-fill this requirement ? Have you ever struggled with such as implementation ?

Thanks in advance for any hint you can share.
Jeff
 
Hi All,
What is the best way in terms of performace, defining a formula field for related objects or using the clause __r  directly in the query ?

Which one is the best approach ?
e.g:
  1. Select Id, Name From Object where Custom_Formula_Field__c = 'Any'
  2. Select Id, Name From Object where Custom Related_Object__r.Custom_Field__c = 'Any'
Many thanks!
 
Hi,
I have a apex batch that is execueted from Schedulre class. Curently I am passing the query from the schduled class in order to limit the records in the test class but I am not sure where is the best place to declare the query, what would be the best practie  ? or Where should I declare the query, in the schedulable class or directly in the apex batch adding a filter as global variable ?

Thanks for you help,
Jeff
Hi all,

We are trying to show information through a community which contains data from Account object. As you may know there is profile for a guest user who can access to Salesforce externally and allow external customers navigating to our community, the thing we want to extend the access for query some accounts (Stores in our cases) but  I am concerned about the security by allowing access to the account object (even read-only) for people with public access to the site. We are thinking to create a specific object to replicate the information which is only needed from Account and then enable public access Read-Only to that one.

What would you consider the best approach to full-fill this requirement ? Have you ever struggled with such as implementation ?

Thanks in advance for any hint you can share.
Jeff
 
I keep getting the "Challenge Not yet Complete......... Here's whats wrong"
Lightning page named 'New Account Page' does not appear to have the correct components on it.

The new record page must use the 'Header and Two Columns' template, be called 'New Account Page', and be assigned to the Account object. (Check this is done)
The page must have the Highlights Panel and Twitter components, and a Tabs component with these tabs containing these components: (Check this is done)
Activity Tab contains the Activities Component - Complete
Collaborate Tab contains the Feed Component - Complete
Related Tab contains the Related Lists Component - Complete
Details Tab contains the Record Detail Component - Compelte

Here is a screen shot, I believe I have all the items I am supposed to as well as what goes inside the components.
User-added image
Hi,
I have a apex batch that is execueted from Schedulre class. Curently I am passing the query from the schduled class in order to limit the records in the test class but I am not sure where is the best place to declare the query, what would be the best practie  ? or Where should I declare the query, in the schedulable class or directly in the apex batch adding a filter as global variable ?

Thanks for you help,
Jeff
Hello, friends
public Account ac{get;set;}

ac= (Account)controller.getRecord();
And
ac= new Account();

Are these both declaration produce the same difference??
I am getting the correct output for both the declaration?
Which one is correct??
Can anyone clear my doubt? M bit confused..

Visualforce

<apex:inputField value="{!ac.Site}"/>
 <apex:inputField value="{!ac.Description}"/>
 <apex:inputField value="{!ac.Name}"/>


 
I'm trying to get my test class coverage to 100%. It doesn't seem to matter what I change, because the coverage is staying at 40%. Could you please take a look and let me know what I'm missing?
trigger setOnlineDocket on Opportunity (before insert, before update) {
    
    List<Campaign> lstCampaign=[Select Id from Campaign where Name='Online Campaign'];
    if(!lstCampaign.isEmpty()){
        for(Opportunity opp:Trigger.New){
            if(opp.StageName=='Review' && opp.CampaignId!=lstCampaign[0].Id){
                opp.CampaignId=lstCampaign[0].Id;
            }
        }
    }
}




@isTest
private class setOnlineDocketTestClass {
	static testMethod void validatesetOnlineDocket() {
		// Create Test Campaign
		List<Campaign> campNew = new List<Campaign>();
		campNew.add(new Campaign(Name = 'Test Online Campaign', IsActive = True, Type = 'Online Campaign', Meeting_Date__c = System.now()));
		insert campNew;
        
        // Verify campaign inserted successfully
		List<Campaign> newCampaign = [SELECT Name FROM Campaign WHERE Id IN :campNew];
        System.assertEquals('Test Online Campaign', newCampaign.Name);
        System.Debug('Campaign Created: ' + newCampaign.Name);
		
		// Create Test Account
		Account accNew = new Account(Name='M Test Account', Letter__c = True);
		insert accNew;
		
		// Verify that the initial state is as expected.
		accNew = [SELECT Name FROM Account WHERE Id = :accNew.Id];
		System.assertEquals('M Test Account', accNew.Name);
        System.Debug('Account Created: ' + accNew.Name);
		
		// Create Test Contact
		Contact conNew = new Contact(AccountId = accNew.Id, lastname = 'Testing', firstname = 'Apex');
		insert conNew;
		
		// Verify contact inserted successfully
		conNew = [SELECT lastname FROM Contact WHERE Id = :conNew.Id];
		System.assertEquals('Testing', conNew.lastname);
        System.Debug('Contact Created: ' + conNew.Name);
		
		// Create Test Opportunity
		Opportunity oppNew = new Opportunity(RecordTypeId = '012A0000000d8jR', AccountId = accNew.Id, Name = 'Maclellan Trigger Test Audit', StageName = 'Committee Review', CloseDate = System.today(), CampaignId = null);
		
        System.Debug('Record Type: ' + oppNew.RecordType + ', AccountId: ' + oppNew.AccountId + ', Opportunity name: ' + oppNew.Name + ', Stage: ' + oppNew.StageName + ', Close Date: ' + oppNew.CloseDate + ', Campaign Id: ' + oppNew.CampaignId);
        insert oppNew;
                
        // Retrieve New Opportunity
        Opportunity oppCreated = [SELECT Name FROM Opportunity WHERE Id = :oppNew.Id];
        System.assertEquals('M Trigger Test Audit', oppCreated.Name);
        System.Debug('Opportunity Created: ' + oppNew.Name);
        
		// Update Opportunity
		oppNew.CampaignId='701G0000000vw7M';
		update oppNew;
		
		// Retrieve Updated Opportunity
		Opportunity oppUpdated = [SELECT CampaignId FROM Opportunity WHERE Id = :oppNew.Id];
		 
		// Test that the trigger updated campaign
		System.assertEquals('701G0000000vw7M', oppUpdated.CampaignId);
		System.Debug('Opportunity Updated with CampaignId: ' + oppUpdated.CampaignId);	
    }
}