• Abel Palma
  • NEWBIE
  • 30 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 6
    Replies
Hi everyone, I'm trying to do this superbadge, but I'm receiving this message "The 'Sign Me Up' button is not automatically assigning the logged in user's name to the new Volunteer Shift Worker record."
I'm stuck since 2 days ago, I have checked the process builder, approval process and quick action
As a System Admin I can see the territories models that are in the Planning stage, but if I used another profile only I can see the active territories models. Why this happened, is this normal because the profile permission or I need to change some configuration fro the other profile also can view the territories model on the Planning stage? 
I have two Salesforce Environment, I want to migrate the territories models from the environment 1 to the environment 2. I didn't find how to do it, the only option that I have now is manual. There is a way to do this automatically?
Hi everyone, I'm trying to set the Operating Hours, but I not able to see it. 
What can I do to set this Operating hour?
I was looking for in Setup and in the Tab but I could not see it. 
 
I´m trying to make the test class of this, but I having problems, I have an error......System.StringException: Invalid id: Colaborador__c:{Id=a0Of4000003bHFxEAM}

this is my apex class
public class ActionColocarCls {
 @AuraEnabled
    public static Colaborador__c getAccountData (Id accountId){        
        Colaborador__c searchAcc = new Colaborador__c();
        searchAcc = [SELECT Name, Empresa__c, Sector__c, Capability__c,Nivel__c FROM Colaborador__C WHERE Id =: accountId];
        system.debug('Account: ' + searchAcc);
        return searchAcc;
    }
}

This is the test class that I´m doing 
@isTest
global class ActionColocarClsTest {
	
    
	@testSetup
    static void setup()	{
        Profile profileAdmin = [SELECT Id FROM Profile WHERE name = 'System Administrator'];
        UserRole roleAdmin=[SELECT Id FROM UserRole WHERE PortalType = 'None' Limit 1];
        User user_test=new User(UserRoleId = roleAdmin.Id, ProfileId = profileAdmin.Id,
                                Username='contactAdmin@deloitte.com',
                                Alias='Admin', Email = 'contactAdmin@deloitte.com',
                                
                                EmailEncodingKey = 'UTF-8', Firstname = 'test',
                                Lastname = 'user', languagelocalekey= 'en_US',
                                LocaleSidKey = 'en_Us', TimeZoneSidKey = 'America/Chicago');
        
        insert user_test;
        User userAdmin=[SELECT id FROM User WHERE email = 'contactAdmin@deloitte.com' LIMIT 1];
        System.runAs(userAdmin){
            
            Colaborador__c con = new Colaborador__c();               
                con.Name='Joe';   
				con.ApellidoMaterno__c='Vargas';
				con.ApellidoPaterno__c='Medina';            
                con.Empresa__c='Deloitte'; 
                con.Sector__c='Digital'; 
                con.Capability__c='SalesForce';
                con.Nivel__c='Analista';  
                
            insert con;                                                    
            Colaborador__c objCol =[SELECT id,Name, Empresa__c, Sector__c, Capability__c,Nivel__c FROM Colaborador__C];                 
               }
    }
     static testmethod void tesActionColocar(){
         Test.startTest();
         Colaborador__c objCol2 = [SELECT id FROM Colaborador__C LIMIT 1];         
         String accountId=String.valueOf(objCol2) ;              
         system.debug('resumen' + objCol2);
         ActionColocarCls.getAccountData(accountId);
         Colaborador__c objColaborador = [SELECT Name, Empresa__c, Sector__c, Capability__c,Nivel__c FROM Colaborador__c WHERE Id =:accountId];                                              
         system.debug('Taer records de colaboradores' +objColaborador);                                       
         Test.stopTest();
            }
}

 
I'm a little confused here, I need to do a test class for cover this lines, but i don´t know how 
 
public class WebServiceController {
    public string selectedValue{get;set;}
    public void retrieveValue(){
        system.debug('Id del cliente' + selectedValue);       
        WebserviceClass.WebserviceClss(selectedValue);      	          
    }
}
I'm trying to do something like this, but I have errors.
public static testmethod void retrieveValueCtrllr(){
        //String selectedValue='D0000001';
        WebServiceController.selectedValue.set=('D0000001');
     	//WebServiceController.retrieveValue(selectedValue) ;
      
    }

 
 
I´m using  SelectOption (a kind of picklist) in an Apex page, I need to pass the parameter to other class with a button (a submit)


This is my visual Force Page:
<apex:page lightningStylesheets="true" ><!--extensions="WebServiceController"-->
    <apex:form>
        <apex:pageBlock title='Employee id'>
            <apex:pageBlockSection>            
                <apex:selectList id="AccountsClients" Title="Accounts ids" size="1">
                     <apex:selectoption itemLabel="Account 1" itemValue="D0000001"></apex:selectoption>
                     <apex:selectoption itemLabel="Account 2" itemValue="D0000002"></apex:selectoption>
                     <apex:selectoption itemLabel="Account 3" itemValue="D0000003"></apex:selectoption>
                     <apex:selectoption itemLabel="Account 4" itemValue="D0000004"></apex:selectoption>
                     <apex:selectoption itemLabel="Account 5" itemValue="D0000005"></apex:selectoption>                               
                </apex:selectList>            
            </apex:pageBlockSection>
            <apex:pageBlockButtons>
            <apex:commandButton value="Register" id="SubmitButton" action="{!IdCuentas}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>



This is the class that needs to receive the parameter 

public class WebserviceClass{
    public HttpResponse WebserviceClss (String numeroCliente){    
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        getClientes__c customSetting= getClientes__c.getValues('saveAccount');
        request.setEndpoint(customSetting.URL__c + numeroCliente);
        request.setMethod('GET');
        system.debug(customSetting.URL__c);
        HttpResponse response = http.send(request);
        system.debug(response);
        return response;
    }
}
 
Hi everyone, I'm trying to do this superbadge, but I'm receiving this message "The 'Sign Me Up' button is not automatically assigning the logged in user's name to the new Volunteer Shift Worker record."
I'm stuck since 2 days ago, I have checked the process builder, approval process and quick action
I'm a little confused here, I need to do a test class for cover this lines, but i don´t know how 
 
public class WebServiceController {
    public string selectedValue{get;set;}
    public void retrieveValue(){
        system.debug('Id del cliente' + selectedValue);       
        WebserviceClass.WebserviceClss(selectedValue);      	          
    }
}
I'm trying to do something like this, but I have errors.
public static testmethod void retrieveValueCtrllr(){
        //String selectedValue='D0000001';
        WebServiceController.selectedValue.set=('D0000001');
     	//WebServiceController.retrieveValue(selectedValue) ;
      
    }