• Mony Gueorguiev 11
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 36
    Replies
Hey,

I'm trying to create an Update Proposal button that exists in our Ticket object. Once clicked it will take you to the edit page of the Primary Proposal associated with that Opportunity on the Ticket. Our Proposal object is custom and is called PPS Proposal. 

I tried doing by structuring an IF statement -- if primary button is checked (for primary proposal) then take me to the edit version of that record.

My code is wrong and not pulling up anything! Please help, where am I going wrong? I have the button set to OnClick Javascript


IF('{PPS_Proposal__c.Primary__c}' == True){
window.parent.location.href = "/{!PPS_Proposal__c.Id}/e&retURL=/{!PPS_Proposal__c.Id}=&saveURL=/{!PPS_Proposal__c.Id}';
}else{
   //do nothing
}
Hey Guys,

Im tasked with creating a Button that updates the related record on a Case/Ticket quick action area that we have in our instance. This button should provide fields for update on the Proposal (PPS Proposals object name) that is attached to that Ticket. So it's an Update button. 

The user needs to have the option to update only a few fields on that record. -

Proposal Status (Picklist)
Core Estimated Hours (Number)
Core Estimated Fees (Currency)
Core Discount (Currency)
One-Time Solution Fee (Currency)
Add-On Estimated Hours (Number)
Add-On Estimated Fees (Currency)
Add-On Discount (Currency)
Type (Picklist)


I have never done this before and could use some (any?) help! Is this even possible? 

Mony
 
So I have tried and tried...everything from the process builder to being on the phone with SF support. Nothing has worked, but yet I need to figure something out.

I want to set up a trigger that does the following:

On an Account, say Company XYZ, we have a field called Type. If we set that to Ex-Customer I would like to have every contact that has portal access under that Account to have their portal access deactivated or in general their SF profile frozen/deactivated. Whatever functionality is easier, it doesnt matter to me. I cannot seem to make this happen! This would help us immensely! 

This is the trigger I have so far...

for(User u : [Select u.Id, u.IsActive, u.IsPortalEnabled from User u where u.ContactId in :cIds]){ if(u.IsActive || u.IsPortalEnabled ){ u.IsActive = false; u.IsPortalEnabled = false; usersToUpdate.add(u); } }

Please let me know what else I need to add in order to make the Ex-Customer connection and the deactivation of the user/profile/portal.

Thank you
Hey Guys,

So this is my trigger:


trigger PrimaryProposal on PPS_Proposal__c (before insert) {

Set<Id> oppIds = new Set<Id>();
    //create an empty set to hold unique Opportunity Ids

    //Loop through our incoming Proposals
    
for(PPS_Proposal__c newProp : trigger.new)

    {

oppIds.add(newProp.Opportunity_Name__c);
    //Add their Ids to our oppIds

    }

    //Retrieve any old proposals who have an Opportunity Id that matches one in that set and whose Primary field is checked
    
List<PPS_Proposal__c> oldProposals = new List<PPS_Proposal__c>([Select Id,Primary_Old__c

                                                            From PPS_Proposal__c

                                                            Where Primary_Old__c = true

                                                            AND Opportunity_Name__c in :oppIds]);

    //Loop over our list of old proposals

for(PPS_Proposal__c oldProp : oldProposals) 

    {

oldProp.Primary_Old__c = false;
    //change each of the old proposals primary fields to unchecked

    }
update oldProposals;
}
    //Loop through our incoming Proposals
    
for(PPS_Proposal__c newProp : trigger.new)

    {

oppIds.add(newProp.Opportunity_Name__c);
    //Add their Ids to our oppIds

    }

    //Retrieve any old proposals who have an Opportunity Id that matches one in that set and whose Primary field is checked
    
List<PPS_Proposal__c> oldProposals = new List<PPS_Proposal__c>([Select Id,Primary_Old__c

                                                            From PPS_Proposal__c

                                                            Where Primary_Old__c = true

                                                            AND Opportunity_Name__c in :oppIds]);

    //Loop over our list of old proposals

for(PPS_Proposal__c oldProp : oldProposals) 

    {

oldProp.Primary_Old__c = false;
    //change each of the old proposals primary fields to unchecked

    }
update oldProposals;



Its my first time writing something of this size and while I'm glad its finally working in Sandbox, I need to push it to production, but really do not know how to write the test class for this, I understand what its supposed to be but have no idea how to create it.

I'd appreciate any help!

Thanks!
Hey Guys,

So I'm a new Salesforce Admin for the company. The previous one left some things I dont quite understand. Like the formula for automatically selecting the Lead Source for Leads coming from Pardot. 

From our Pardot Secondary Lead Source field, we have our normal Seconday Lead Source field populate, for reporting purposes. So if the Pardot Seconday Lead Source field is Chat then our, normal, Secondary Lead Source field will be Chat. That I understand. 

What I dont understand is the connection between Pardot and SF and how that Pardot field is being calculated/determined. The formula in that field is as follows:

IF( CONTAINS(pi__campaign__c, "Google"), "Google", 
IF( CONTAINS(pi__campaign__c, "eBOOKS"), "eBook", 
IF( CONTAINS(pi__campaign__c, "LINKEDIN"), "LinkedIn", 
IF( CONTAINS(pi__campaign__c, "WHITE PAPERS"), "White Papers", 
IF( CONTAINS(pi__campaign__c, "EVENTS"), "Events", 
IF( CONTAINS(pi__campaign__c, "DEMO/PODCAST"), "Demo/ Podcast", 
IF( CONTAINS(pi__campaign__c, "CONTACT US"), "Contact Us", 
IF( CONTAINS(pi__campaign__c, "SN- Service Notifications Completed Form"), "Customer", 
"Digital Campaigns"))))))))

And the edit I want to make is to add "Website Chat" as a source. Right now for some reason our chat (using Olark) is connected to Pardot and from there gets pushed to SF, but it comes in under Digital Campaigns. We want a chat lead coming in with the Pardot Secondary Lead Source and our normal Secondary Lead Source Field to say/be labaled as Website Chat.

I'd really appreciate any help! Sorry if posted in the wrong section!
Hi,

I have a quick question regarding how to carry over information into a newly created record. How to have a checkbox check carry over to newly created records and old ones have the checkbox unchecked?

Essentially, we have a Proposal object that we create proposals off of. We may have more than 1 proposal for any one Opportunity. But, only 1 of those Proposals will be the Primary one. The Primary field in the Proposal layout is a checkbox. How can I have that box checked automatically each time a new proposal is made and how can the previous (older proposal(s)) have the Primary box unchecked?

I just can't seem to wrap my head around this. Any help is greatly appreciated!

Thanks


 
Hey Guys,

Im tasked with creating a Button that updates the related record on a Case/Ticket quick action area that we have in our instance. This button should provide fields for update on the Proposal (PPS Proposals object name) that is attached to that Ticket. So it's an Update button. 

The user needs to have the option to update only a few fields on that record. -

Proposal Status (Picklist)
Core Estimated Hours (Number)
Core Estimated Fees (Currency)
Core Discount (Currency)
One-Time Solution Fee (Currency)
Add-On Estimated Hours (Number)
Add-On Estimated Fees (Currency)
Add-On Discount (Currency)
Type (Picklist)


I have never done this before and could use some (any?) help! Is this even possible? 

Mony
 
Hey Guys,

Im tasked with creating a Button that updates the related record on a Case/Ticket quick action area that we have in our instance. This button should provide fields for update on the Proposal (PPS Proposals object name) that is attached to that Ticket. So it's an Update button. 

The user needs to have the option to update only a few fields on that record. -

Proposal Status (Picklist)
Core Estimated Hours (Number)
Core Estimated Fees (Currency)
Core Discount (Currency)
One-Time Solution Fee (Currency)
Add-On Estimated Hours (Number)
Add-On Estimated Fees (Currency)
Add-On Discount (Currency)
Type (Picklist)


I have never done this before and could use some (any?) help! Is this even possible? 

Mony
 
So I have tried and tried...everything from the process builder to being on the phone with SF support. Nothing has worked, but yet I need to figure something out.

I want to set up a trigger that does the following:

On an Account, say Company XYZ, we have a field called Type. If we set that to Ex-Customer I would like to have every contact that has portal access under that Account to have their portal access deactivated or in general their SF profile frozen/deactivated. Whatever functionality is easier, it doesnt matter to me. I cannot seem to make this happen! This would help us immensely! 

This is the trigger I have so far...

for(User u : [Select u.Id, u.IsActive, u.IsPortalEnabled from User u where u.ContactId in :cIds]){ if(u.IsActive || u.IsPortalEnabled ){ u.IsActive = false; u.IsPortalEnabled = false; usersToUpdate.add(u); } }

Please let me know what else I need to add in order to make the Ex-Customer connection and the deactivation of the user/profile/portal.

Thank you