• Jake Backues
  • NEWBIE
  • 40 Points
  • Member since 2015
  • Independant Contractor, Architect
  • Jebenuity, LLC


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 4
    Questions
  • 26
    Replies
Hi Everyone,

Can someone please tell me when cloning an 'Opportunity with Products' should the 'OpportunityLineItem before update or insert Trigger' get executed?
It appears that the OpportunityLineItem trigger is NOT firing when I clone a 'Opportunity with Products'. I can tell because the SalesPrice is not being calculated correctly which should occur when the Trigger executes and calls the apex class that does the calculation. Thanks.
My org has decided to use arrays over lists to reduce our overall code. We have a large amount of it. I have a SOSL query that returns and array of an array of SObjects. How can i use arrays instead of lists for the return value?

I get errors when doing this
SObject[][] searchList = [
            FIND :query IN ALL FIELDS RETURNING 
            Opportunity(Id, Name WHERE RecordType.Name In :recordTypeNames, 
            Service__c(Id, Name WHERE RecordType.Name In :recordTypeNames AND Status__c IN :serviceStatuses)
        ];

 
In my helper js class, what is the difference between calling methods using the passed in helper from my parameters or calling a method using this? Is one better than the other? does one kick off a new asynchronous process and one stays synchronous with the current process?
 
({ 
    doInit : function (component, event, helper) {
        helper.getContacts(component, event);
        this.getContacts(component, event);
    },
    
    getContacts: function(component, event) {

    }
})

 
So I just made my new TP, found the settings to rename it. clicked on the Launch your hands-on org after making sure it was the default hands on org and I get an error:
This site can’t be reached
cunning-raccoon-380385-dev-ed.lightning.force.com’s server DNS address could not be found.

I have my normal DE org connected as well and it takes me to the login page for that org where I can log in successfully. Not sure what I'm missing?
Any help is appreciated, Thanks!
I currently have an invocable method being called by a flow. the invocable method return a List<List<String>> in order to send back a list of options, in this case paper types, in a specific order. The flow gets this list returned as a Collection, but I need it to be a dynamic list of options.

Does anyone know how to convert the Collection to this or have my invocable method return this type to the Visual Workflow?
My org has decided to use arrays over lists to reduce our overall code. We have a large amount of it. I have a SOSL query that returns and array of an array of SObjects. How can i use arrays instead of lists for the return value?

I get errors when doing this
SObject[][] searchList = [
            FIND :query IN ALL FIELDS RETURNING 
            Opportunity(Id, Name WHERE RecordType.Name In :recordTypeNames, 
            Service__c(Id, Name WHERE RecordType.Name In :recordTypeNames AND Status__c IN :serviceStatuses)
        ];

 
I have created the lightning component and want to display it on VF page and render as PDF. For this, I have created a Lightning Dependency App and added it to VF page using $Lightning.createComponent(String type, Object attributes, String locator, function callback). 
I have followed steps mentioned in the following documentation: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm
But nothing is displayed in PDF.

Here is the code:
App:
​<aura:application access="GLOBAL" extends="ltng:outApp">
    <aura:dependency resource="c:AccountSnapshotComponent"/>
</aura:application>

VF Page:
<apex:page renderAs="pdf" standardStylesheets="false">
    <apex:includeLightning />
    <div id="lightning" />
    <script>
        $Lightning.use("c:AccountSnapshotApp", function() {
            $Lightning.createComponent("c:AccountSnapshotComponent",
                                       { label : "Press Me!" },
                                       "lightning",
                                       function(cmp) {
                                           // do some stuff
                                       });
        });
    
    </script>
</apex:page>

 Please help to display data in PDF format.
Hello everyone;
I have the following code running fine in Sandbox for all users, and in Production fo all users BUT for public site/guest user.
CCNUSADMIN_CurrencyRates cache is set to Public.
------------
PageReference curRatPR = new PageReference('/resource/CCNUSADMIN_CurrencyRates');
curRatList = curRatPR.getContent().toString().split(',', 0); 
---------
When accessed by the guest user, the following error, on the getContent() line:
avax.net.ssl.SSLPeerUnverifiedException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
---------
My Site SFDC URL is: http://ccnus.force.com/  which is redirected to a custom URL 'us.classiccarnetwork.org', served by a SSL certificate that runs OK. Any idea why I get this message and more important, what I need to do to allow the Public Site user to access this static resources?
Thanks in advance for your help. Best regards,
Jerome
In my helper js class, what is the difference between calling methods using the passed in helper from my parameters or calling a method using this? Is one better than the other? does one kick off a new asynchronous process and one stays synchronous with the current process?
 
({ 
    doInit : function (component, event, helper) {
        helper.getContacts(component, event);
        this.getContacts(component, event);
    },
    
    getContacts: function(component, event) {

    }
})

 
So I just made my new TP, found the settings to rename it. clicked on the Launch your hands-on org after making sure it was the default hands on org and I get an error:
This site can’t be reached
cunning-raccoon-380385-dev-ed.lightning.force.com’s server DNS address could not be found.

I have my normal DE org connected as well and it takes me to the login page for that org where I can log in successfully. Not sure what I'm missing?
Any help is appreciated, Thanks!
Hi Everyone,

I have the formula field below which works great. Basically if Account_Number__c contains '-1' it will populate ShippingStreet, else, BillingStreet.
IF(  CONTAINS(Account_Number__c , "-1") , ShippingStreet , BillingStreet)

Now, I want to add default address field so a third condition. So what I'm looking for is if Account_Number__c contains '-1' populate ShippingStreet, else, Billing​Street, if Billing Street is blank populate ShippingStreet.
Running into a strange issue -- I have developed several lightning components that are displayed in Lightning App Builder. I added a second one that has all the same "implements=" as the other ones, but for some reason is not showing as an option in App Builder. Given the fact that other components are showing up - any ideas/thoughts on things to check? Here is my aura:component line:
 
<aura:component controller="SecureSiteController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global">

 
I currently have an invocable method being called by a flow. the invocable method return a List<List<String>> in order to send back a list of options, in this case paper types, in a specific order. The flow gets this list returned as a Collection, but I need it to be a dynamic list of options.

Does anyone know how to convert the Collection to this or have my invocable method return this type to the Visual Workflow?
@Lauren Grau - Just curious on how many badges can you get in total...Admin and Dev. 
While developing in Apex, I need to retrieve sandbox name in my code.  How do I do this in Apex?  Thanks in advance.

Hello,

 

I am wrote this really simple trigger to stop the changing of the ownership of open activities.  Whenever account owner changes in SF, it changes all of the open activitiy owners of tasks to the new owner of the account.   We don't want that to happen.  Here's my code:

 

 

trigger StopTaskOwnerChange on Task (before update) {

    List<Task> updateTask = new List<Task>();
    
        for(Task t : trigger.new){
            if(t.ownerId != t.CreatedById)
                updateTask.add(t);
        }
        
        for(Task t : updateTask){
        t.ownerId = t.CreatedById;
        }

 


I am thinking this problem with this is probably has to do with timing of the execution of the trigger.  I know salesforce automatically changes all of the activity ownership automatically, and I am wondering if I'm firing my trigger before salesforce automatically changes the Owners so it looks the owner is not changing.

 

 

 

Hi All,

I am facing this issue.

Anyone have any idea how to solve this.

public void SaveChanges()
{
List<Account> AccountList = [Select Id, Name,(Select Id From Contacts) From Account where Id=:this.AccountId];


if(AccountList.size() > 0)
{
Account UpdateAccount = AccountList[0];
UpdateAccount.Name = this.Name;
UpdateAccount.AccountNumber = this.AccountNumber;
update UpdateAccount;

if(AccountList[0].Contacts.size() > 0)
{
Contact UserContact = AccountList[0].Contacts[0];
UserContact.FirstName = this.FirstName;
UserContact.LastName = this.LastName;
UserContact.Email = this.PersonalEmailId;
update UserContact;
}
else
{
Contact UserContact = new CanGeneral__c(AccountId = AccountList[0].Id,FirstName = this.FirstName,
LastName = this.LastName, Email = this.PersonalEmailId);
insert UserContact;
}
}
}

Cannot see the Phone icon in the Console and also softphone is not visible on the home page or any othe tab? Why
1) Installed CTI Adapter
2) Call Center Setup done and user assigned.
3) Layout of the Softphone assigned to the user.

Let me know what i am missing.

Thanks
Sanjay