• Pablo Ledesma 8
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies
I have an issue in the module Lightning web component basics > Push and Deploy Lightning Web Component Files.

After clone the repo, execute this command...

sfdx force:source:deploy -p force-app -u myhuborg
 
sfdx force:source:deploy -p force-app -u myhuborg
PROJECT PATH                                                                                       ERROR
─────────────────────────────────────────────────────────────────────────────────────────────────  ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
force-app\main\default\objects\Case\fields\Product__c.field-meta.xml                               Cannot update a field to a Lookup, MasterDetail, or Hierarchy from something else (44:13)
force-app\main\default\objects\Product_Family__c\listViews\All_Product_Families.listView-meta.xml  SharedTo not allowed:roleAndSubordinatesInternal - CEO (106:19)
force-app\main\default\objects\Account\listViews\All_Acounts.listView-meta.xml                     SharedTo not allowed:roleAndSubordinatesInternal - CEO (103:19)
force-app\main\default\sites\E_Bikes.site-meta.xml                                                 Communities must be enabled before deploying a Chatter Network Site
force-app\main\default\siteDotComSites\E_Bikes_C.site                                              You don't have the correct site publisher privileges for this operation Site : E-Bikes, type: Site.com Community(db=C,api=ChatterNetworkPicasso)
force-app\main\default\networkBranding\cbE_Bikes.networkBranding                                   Network not found for the CustomBrand : cbE_Bikes
force-app\main\default\layouts\Case-Case Layout.layout-meta.xml                                    In field: QuickAction - no QuickAction named Case.CaseComment found
ERROR running force:source:deploy:  Deploy failed.
Please help me!
 
I have an issue in the step 5 wen I execute this:

sfdx force:package2:version:create --directory force-app --wait 10

I get this error

ERROR:  dreamhouse: In field: application - no CustomApplication named DreamHouse found,DreamHouse: Property 'tabs' not valid in version 41.0.

Could you please help me?
Since I created a force.com site I have not been able to visualize a visualforce page because I get this error DNS_PROBE_FINISHED_NXDOMAIN.
User-added image

Now I have 2 domains and although I disabled the site I created, the error persists

User-added image
Hello

I need urgent help here!
I need to write test class for this code generated from wsdl file:
 
https://bitbucket.org/pabloledesma/credifamilia/src/e16cbf0aed70a552580bd84404b21b7b17af31bf/Arenero/src/classes/WSOtorgamiento.cls?at=master&fileviewer=file-view-default
These is my mock implementation:
@isTest
global class WsOtorgamientoMock implements WebServiceMock {
    
   global void doInvoke(
           Object stub,
           Object request,
           Map<String, Object> response,
           String endpoint,
           String soapAction,
           String requestName,
           String responseNS,
           String responseName,
           String responseType) {
           	
        WSOtorgamiento.BuscaDeudorResponse_element response_x; 
        Map<String, WSOtorgamiento.BuscaDeudorResponse_element> response_map_x = new Map<String, WSOtorgamiento.BuscaDeudorResponse_element>();
        response_map_x.put('response_x', response_x);
       	List<WSOtorgamiento.Deudor> lstDeudor = new List<WSOtorgamiento.Deudor>();
       	WSOtorgamiento.Deudor deudor = new WSOtorgamiento.Deudor(
       		Beta_Capa_Pago_12=0.0, 
			Beta_Capa_Pago_13=-0.28589, 
			Beta_Capa_Pago_14=0, 
			Beta_Capa_Pago_15=0, 
			Beta_Consul_Sector_F_C_12=0, 
			Beta_Consul_Sector_F_C_13=0.04723, 
			Beta_Edad_Cre_Abi_Cer_11=-0.16931, 
			Beta_Edad_Cre_Abi_Cer_12=0, 
			Beta_Recursos_Propios=-0.0311202, 
			Beta_Rela_Cuota_Ingr_11=0, 
			Beta_Rela_Cuota_Ingr_12=-0.05562, 
			Beta_TC_11=0, 
			Beta_TC_12=0, 
			Calificacion='BB+', 
			Capacidad_Pago=59.33, 
			Cedula=80035035, 
			Cons_Sector_F_C=3, 
			Cred_Abiertos_Cerrados=35, 
			Edad=36, 
			Estado_Salesforce='desembolsado', 
			Fecha_Calculo=2017/10/19 10:59:59, 
			Indi_Recursos_Propios=0.17, 
			LTV=40.0, 
			PDI=12.0,  
			Perdida_Esperada=203255.79, 
			Porc_Utilizacion_TC=74.2, 
			Rela_Cuota_Ingreso=27.77, 
			Valor_Cupos_TC=30189000, 
			Valor_Inmueble=20656076, 
			Z=0.1816198 
	       		
       	);
       	
        response.put('response_x', lstDeudor); 
   
	}
}
AND
 
@isTest
    static void calificacion_con_informacion_completa()
    {
    	Id accId = TestDataFactory.createAccount('12345678');
    	Id datacreditoId = TestDataFactory.createDatacredito('12345678');
    	Opportunity opp = TestDataFactory.createRawOpportunity(accId);
    	insert opp;
    	Solicitud_de_credito__c sc = TestDataFactory.createRawSolicitudDeCredito(opp.Id); 
    	insert sc;
    	Informacion_comite__c ic = TestDataFactory.createRawInformacionComite(sc.Id);
    	RecordType rtHipotecario = [
    		select 
    			id, 
    			Name 
    		from RecordType
    		where sObjectType = 'Informacion_comite__c' 
    		and Name = 'Hipotecario'
    	];
    	
    	ic.RecordTypeId = rtHipotecario.Id;
    	
    	/** Variables requeridas para el modelo **/
        
        //Cliente deudor
        ic.Cliente_deudor__c = accId;
        
        //Relación cuota ingreso
        ic.Credito_sugerido__c = 500000; // Valor del desembolso
        ic.Ingresos_mes__c = 1200000;
        ic.Factor_por_millon_propuesta__c = 3568;
        
        // Tipo de proceso
        ic.Tipo_de_proceso_informacion_comite__c = 'Nuevo';
        
        // Indice relación cuota ingreso neto propuesta
        ic.Ingreso_neto_total__c = 10000000;
        
        // Ltv sugerido
        ic.Compromisos_de_pago__c = 1000000;
        ic.Cesantias_propuesta__c = 1000;
        ic.Subsidio_propuesta__c = 1000;
        ic.Diferencia_Mejoramiento_Sugerido__c = 1000;
        
    	insert ic; 
    	 
        PageReference infoComite = Page.informacion_comite;
    	Test.setCurrentPage(infoComite);
        ApexPages.StandardController icController = new ApexPages.StandardController(ic);
        CalificacionCtrl ctrl = new CalificacionCtrl(icController);
        
        System.assertEquals(
        	0,
        	ctrl.errores.size(),
        	'Falta información requerida en la información comite'
        );
        
        Test.setMock(WSOtorgamiento.class, new WsOtorgamientoMock());
        
        Test.startTest();
	    	String respuesta = CalificacionCtrl.calificacion(
	    		Double.valueOf(ctrl.infocomite.Ind_relacion_cuota_ingeso_neto_propuesta__c),
	    		Double.valueOf(ctrl.infocomite.Relacion_cuota_ingreso_propuesta__c),
	    		Double.valueOf(ctrl.infocomite.Recurso_propio__c),
	    		Integer.valueOf(ctrl.diaDeNacimiento),
	    		Integer.valueOf(ctrl.mesDeNacimiento),
	    		Integer.valueOf(ctrl.anoDeNacimiento),       		
	    		ctrl.clienteDeudor.Numero_de_documento__c,
	    		Integer.valueOf(ctrl.infocomite.Credito_sugerido__c),
	    		ctrl.infocomite.Solicitud_de_credito__r.Name,
	    		ctrl.infocomite.El_credito_fue__c,
	    		Double.valueOf(ctrl.infocomite.Ltv_sugerido__c),
	    		(Id)ctrl.infocomite.Id
	    	);
    	
	    	System.debug('respuesta: ' +respuesta);
    	Test.stopTest();
    	
    	
    	System.assertEquals(
    		1,
    		[select count() from calificacion__c where informacion_comite__c =:ic.id]
    	);
        
        
    }
I appreciate any indication to help me
Hi
I have been trying to pass this challenge (https://trailhead.salesforce.com/en/trails/force_com_dev_intermediate/modules/apex_integration_services/units/apex_integration_webservices):

To pass this challenge, create an Apex REST class that is accessible at '/Accounts/<Account_ID>/contacts'. The service will return the account's ID and Name plus the ID and Name of all contacts associated with the account. Write unit tests that achieve 100% code coverage for the class and run your Apex tests.
The Apex class must be called 'AccountManager'.
The Apex class must have a method called 'getAccount' that is annotated with @HttpGet
The method must return the ID and Name for the requested record and all associated contacts with their ID and Name.
The unit tests must be in a separate Apex class called 'AccountManagerTest'.
The unit tests must cover all lines of code included in the AccountManager 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.

I getting this error:

Challenge Not yet complete... here's what's wrong: 
Executing the 'AccountManager' method failed. Either the service isn't configured with the correct urlMapping, is not global, does not have the proper method name or does not return the requested account and all of its contacts.

This is my code:
 
@RestResource(urlMapping='/Accounts/*/contacts')
global with sharing class AccountManager {
	
    @HttpGet
    global static List<sObject> getAccount(){
        RestRequest request = RestContext.request;
        List<String> urlParams = request.requestURI.split('/');
        
        String accountId;	
        for(String param: urlParams){
            if((param != 'Accounts') && (param != 'contacts'))
                accountId = param;
        }
    
        List<Account> lstAccounts = new List<Account>();
        lstAccounts = [SELECT Id, Name FROM Account WHERE Id = :accountId];
        
        List<sObject> result = new List<sObject>();
        result.add(lstAccounts[0]);
        
        List<Contact> lstContacts = [SELECT Id, Name FROM Contact WHERE AccountId = :accountId];
        for(Contact c:lstContacts){
            result.add(c);
        }
        return result;
    }
}

This is my response
 
[ {
  "attributes" : {
    "type" : "Account",
    "url" : "/services/data/v39.0/sobjects/Account/001o0000015hgVBAAY"
  },
  "Id" : "001o0000015hgVBAAY",
  "Name" : "SFDC Computing"
}, {
  "attributes" : {
    "type" : "Contact",
    "url" : "/services/data/v39.0/sobjects/Contact/003o000001DbYc8AAF"
  },
  "Id" : "003o000001DbYc8AAF",
  "Name" : "Pepito Peres"
}, {
  "attributes" : {
    "type" : "Contact",
    "url" : "/services/data/v39.0/sobjects/Contact/003o000001BsUPwAAN"
  },
  "Id" : "003o000001BsUPwAAN",
  "Name" : "Last0"
} ]

Can someone light my way?​
Hi
I have been trying to pass this challenge (https://trailhead.salesforce.com/en/trails/force_com_dev_intermediate/modules/apex_integration_services/units/apex_integration_webservices):

To pass this challenge, create an Apex REST class that is accessible at '/Accounts/<Account_ID>/contacts'. The service will return the account's ID and Name plus the ID and Name of all contacts associated with the account. Write unit tests that achieve 100% code coverage for the class and run your Apex tests.
The Apex class must be called 'AccountManager'.
The Apex class must have a method called 'getAccount' that is annotated with @HttpGet
The method must return the ID and Name for the requested record and all associated contacts with their ID and Name.
The unit tests must be in a separate Apex class called 'AccountManagerTest'.
The unit tests must cover all lines of code included in the AccountManager 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.

I getting this error:

Challenge Not yet complete... here's what's wrong: 
Executing the 'AccountManager' method failed. Either the service isn't configured with the correct urlMapping, is not global, does not have the proper method name or does not return the requested account and all of its contacts.

This is my code:
 
@RestResource(urlMapping='/Accounts/*/contacts')
global with sharing class AccountManager {
	
    @HttpGet
    global static List<sObject> getAccount(){
        RestRequest request = RestContext.request;
        List<String> urlParams = request.requestURI.split('/');
        
        String accountId;	
        for(String param: urlParams){
            if((param != 'Accounts') && (param != 'contacts'))
                accountId = param;
        }
    
        List<Account> lstAccounts = new List<Account>();
        lstAccounts = [SELECT Id, Name FROM Account WHERE Id = :accountId];
        
        List<sObject> result = new List<sObject>();
        result.add(lstAccounts[0]);
        
        List<Contact> lstContacts = [SELECT Id, Name FROM Contact WHERE AccountId = :accountId];
        for(Contact c:lstContacts){
            result.add(c);
        }
        return result;
    }
}

This is my response
 
[ {
  "attributes" : {
    "type" : "Account",
    "url" : "/services/data/v39.0/sobjects/Account/001o0000015hgVBAAY"
  },
  "Id" : "001o0000015hgVBAAY",
  "Name" : "SFDC Computing"
}, {
  "attributes" : {
    "type" : "Contact",
    "url" : "/services/data/v39.0/sobjects/Contact/003o000001DbYc8AAF"
  },
  "Id" : "003o000001DbYc8AAF",
  "Name" : "Pepito Peres"
}, {
  "attributes" : {
    "type" : "Contact",
    "url" : "/services/data/v39.0/sobjects/Contact/003o000001BsUPwAAN"
  },
  "Id" : "003o000001BsUPwAAN",
  "Name" : "Last0"
} ]

Can someone light my way?​
Lightning Web Component mock data Test is not working with registerLdsTestWireAdapter.

After emiting data is not reflecting on DOM.
Hello all,

I followed the directions in the Trailhead module and clicked https://localhost:8443. I received the below error.

This site can’t be reached
localhost refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

I have internet connection, there is no proxy, and I turned off the firewall. I saw documentation that suggested checking for missing "listen:443". I found it in the nginx.conf file. Any help would be appreciated. Thank you.
I have an issue in the step 5 wen I execute this:

sfdx force:package2:version:create --directory force-app --wait 10

I get this error

ERROR:  dreamhouse: In field: application - no CustomApplication named DreamHouse found,DreamHouse: Property 'tabs' not valid in version 41.0.

Could you please help me?

https://trailhead.salesforce.com/projects/workshop_mgmt/steps/workshop_mgmt_apex
User-added image
global without sharing class GiveWorkThanksAction {

    @InvocableMethod(label='Give a Thanks Badge')
    global static void giveWorkBadgeActionsBatch(List<GiveWorkThanksRequest> requests) {
        for(GiveWorkThanksRequest request: requests){
            giveWorkBadgeAction(request);
        }
    }

    public static void giveWorkBadgeAction(GiveWorkThanksRequest request) {
        WorkThanks newWorkThanks = new WorkThanks();

                newWorkThanks.GiverId = request.giverId;
                newWorkThanks.Message = request.thanksMessage;
                newWorkThanks.OwnerId = request.giverId;

        insert newWorkThanks;


        WorkBadge newWorkBadge = new WorkBadge();

                // newWorkBadge.DefinitionId should be set to the ID for the Competitor Badge within this Org
                WorkBadgeDefinition workBadgeDef = [SELECT Id,Name FROM WorkBadgeDefinition WHERE Name = :request.badgeName Limit 1];

                newWorkBadge.DefinitionId = workBadgeDef.Id;
                newWorkBadge.RecipientId = request.receiverId;
                newWorkBadge.SourceId = newWorkThanks.Id ;
                //newWorkBadge.GiverId = request.giverId;

        insert newWorkBadge;

        WorkThanksShare newWorkThanksShare = new WorkThanksShare();

                newWorkThanksShare.ParentId = newWorkThanks.Id ;
                newWorkThanksShare.UserOrGroupId = request.receiverId;

                newWorkThanksShare.AccessLevel = 'Edit';
                insert newWorkThanksShare;

        FeedItem post = new FeedItem();

                post.ParentId = request.receiverId;
                post.CreatedById = request.giverId;
                post.Body = request.thanksMessage;
                post.RelatedRecordId = newWorkThanks.Id ;
                post.Type = 'RypplePost';

        insert post;

    }

    global class GiveWorkThanksRequest {
        @InvocableVariable(label='Giver Id' required=true)
        global Id giverId;

        @InvocableVariable(label='Receiver Id' required=true)
        global Id receiverId;

        @InvocableVariable(label='Thanks Message' required=true)
        global String thanksMessage;

        @InvocableVariable(label='Badge Name' required=true)
        global String badgeName;
    }
}
 
I am in the last action where the process builder calls the invocable apex class. When i look for the class it appears with the LabelName
 'Give a Thanks Badge' and the lookups do not show up on the Giver Id and Receiver Id fields. Can someone tell me what am I doing wrong?
User-added image
If i put the apex class name as is shown in the trail it still does not find the Giver Id and Receiver Id values. My apex code has an active status.
User-added image
Thank you.
I'm using MS Windows 8.1 with Google Chrome Version 35.0.1916.114 m
I have a free Salesforce trial version

From the "My Name" menu I chose "Developer Console".
I get a new window Force.com Developer Console with the "Loading workspace ..." progress bar.
The progress bar gets hung at about 50%.

Any advice?

Odeddevelopers console will not load