• Jake Hebert 22
  • NEWBIE
  • 35 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 8
    Replies
Help
Trying to get code coverage for the code below. I am currently getting 69% on this triggger. I can not seem to cover  the try cacth block. Please help
Thanks

trigger ContactTrigger on Contact (before update, after update) {
    Contacthandler = ContactHandler.getHandler();
    
    try {        
        if(Trigger.isBefore) {
            if (Trigger.isUpdate) {
                
                
                handler.checkmytest(Trigger.new);//check if dates have changed
                handler.checkpeople(Trigger.new);//sort dates according to source and priority
                
        }

        
        if(Trigger.isAfter) {
            if (Trigger.isUpdate) {
                handler.individual(Trigger.new, Trigger.oldMap);
            }
        }
    }
    catch(DMLException e) {
        for (Integer i=0 ; i<e.getNumDml() ; i++) {
            Contact o = Trigger.newMap.get(e.getDmlId(i));
            o.addError(e.getDmlMessage(i));
        }
    }
}

 

This critical update is breaking several of my lightning components that use the URL to receive parameters. It is stripping out parameters, however none of my fields or parameters are part of a managed package. They aren't "query parameters". Not sure why anything related to pageReferences would even affect my lightning components since I'm pretty certain the lightning framework doesn't care about "pageReference.state" at all.
 
This feels like a bug to me. If I tell that to salesforce support (which I'm about to do anyway) they are going to tell me that I don't have developer support and to come check the forms. *smh*
 
Here is an example of the URL that gets produced when I have the critical update off:
https://hs--deviv.lightning.force.com/lightning/n/RecordCreatePage?Object=Account&RecTypeId=01241000000VE0hAAG&ReturnRecId=0013C000009sJ9NQAU&Name=Test2018-09-28&ParentId=0013C000009sJ9NQAU&Account_Type__c=Franchise&BillingCity=Austin&BillingCountryCode=US&BillingPostalCode=78701&BillingStateCode=TX&BillingStreet=123%20Some%20Street2018-09-28&ShippingCity=Austin&ShippingCountryCode=US&ShippingPostalCode=78701&ShippingStateCode=TX&ShippingStreet=123%20Some%20Street2018-09-28&POS_Type__c=a0F3C0000007OyoUAE&Concept__c=a033C000001LHOGQA4&OwnerId=00541000000k4fPAAQ&Customer_Success_Manager__c=null&Sales_Rep__c=null
 
Here is clicking the exact same link with the update off:
https://hs--deviv.lightning.force.com/lightning/n/RecordCreatePage?Account_Type__c=Franchise&POS_Type__c=a0F3C0000007OyoUAE&Concept__c=a033C000001LHOGQA4&Sales_Rep__c=null
 
So, a whole bunch of seemingly random parameters just get deleted upon navigation. Doesn't seem like that's something the update is supposed to do. Any thoughts? Anybody else having this issue?

This critical update is breaking several of my lightning components that use the URL to receive parameters. It is stripping out parameters, however none of my fields or parameters are part of a managed package. They aren't "query parameters". Not sure why anything related to pageReferences would even affect my lightning components since I'm pretty certain the lightning framework doesn't care about "pageReference.state" at all.
 
This feels like a bug to me. If I tell that to salesforce support (which I'm about to do anyway) they are going to tell me that I don't have developer support and to come check the forms. *smh*
 
Here is an example of the URL that gets produced when I have the critical update off:
https://hs--deviv.lightning.force.com/lightning/n/RecordCreatePage?Object=Account&RecTypeId=01241000000VE0hAAG&ReturnRecId=0013C000009sJ9NQAU&Name=Test2018-09-28&ParentId=0013C000009sJ9NQAU&Account_Type__c=Franchise&BillingCity=Austin&BillingCountryCode=US&BillingPostalCode=78701&BillingStateCode=TX&BillingStreet=123%20Some%20Street2018-09-28&ShippingCity=Austin&ShippingCountryCode=US&ShippingPostalCode=78701&ShippingStateCode=TX&ShippingStreet=123%20Some%20Street2018-09-28&POS_Type__c=a0F3C0000007OyoUAE&Concept__c=a033C000001LHOGQA4&OwnerId=00541000000k4fPAAQ&Customer_Success_Manager__c=null&Sales_Rep__c=null
 
Here is clicking the exact same link with the update off:
https://hs--deviv.lightning.force.com/lightning/n/RecordCreatePage?Account_Type__c=Franchise&POS_Type__c=a0F3C0000007OyoUAE&Concept__c=a033C000001LHOGQA4&Sales_Rep__c=null
 
So, a whole bunch of seemingly random parameters just get deleted upon navigation. Doesn't seem like that's something the update is supposed to do. Any thoughts? Anybody else having this issue?

Help
Trying to get code coverage for the code below. I am currently getting 69% on this triggger. I can not seem to cover  the try cacth block. Please help
Thanks

trigger ContactTrigger on Contact (before update, after update) {
    Contacthandler = ContactHandler.getHandler();
    
    try {        
        if(Trigger.isBefore) {
            if (Trigger.isUpdate) {
                
                
                handler.checkmytest(Trigger.new);//check if dates have changed
                handler.checkpeople(Trigger.new);//sort dates according to source and priority
                
        }

        
        if(Trigger.isAfter) {
            if (Trigger.isUpdate) {
                handler.individual(Trigger.new, Trigger.oldMap);
            }
        }
    }
    catch(DMLException e) {
        for (Integer i=0 ; i<e.getNumDml() ; i++) {
            Contact o = Trigger.newMap.get(e.getDmlId(i));
            o.addError(e.getDmlMessage(i));
        }
    }
}

 
Hi all,

there is the critical update "Add a Namespace Prefix to Query Parameters and pageReference.state Properties", where we don't know how to test. What does Salesforce mean with it? an example?.



 
Hello Everyone,
I am having a major problem.  I have no idea how to code and thus starts my issue.  I am trying to activate quantity and Revenue Scheduling for quotes as well as contract.  However, this isn't supported in lightning.  We do not want to pay for a App or hire a consultant.  We need an amount of samples input that have a standard price per sample; an amount of grams (that change price a certain milestones).  

Hi,

 

I'm using the following package.xml snippet to retrieve email template from an organisation. The execution of "retrieveUnpackaged" command was successful and retrieved  retrieveUnpackaged\email\unfiled$public\Test_Notification.email and retrieveUnpackaged\email\unfiled$public\Test_Notification.email-meta.xml files. I then ran "deployUnpackaged" to deploy the downloaded email template and received this error:

 

Error: package.xml(unfiled$public):An object 'unfiled$public' of type EmailTemplate was named in package.xml, but was not found in zipped directory

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>unfiled$public</members>
<members>unfiled$public/Test_Notification</members>
<name>EmailTemplate</name>
</types>
<version>23.0</version>
</Package>

 

Any suggestions would be appreciated.

 

Thanks!

Hi all,

there is the critical update "Add a Namespace Prefix to Query Parameters and pageReference.state Properties", where we don't know how to test. What does Salesforce mean with it? an example?.