• Kenn K.
  • NEWBIE
  • 10 Points
  • Member since 2011
  • Klatch Inc

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 19
    Replies
Is there a way in the approval to only send emails to to approvers when an approval request has been rejected?
This should only be sent to the people who are in the approval path and maybe they had approved before.
Also, please consider the option of where the approver is manually chosen and not just the static assigned approver. 

Thanks.

I have deactivated one the recordtype we have and I still see the option when I create a new case i.e. under 'Available cases record types'

I deleted it without any issues and it just got rid of the name. I now see the id of the deleted recordtype.

Is there something I'm missing here to remove it from the available case record types?

We are updating our SSO certificate and wanted to know if anyone has done it before and is there best practises on doing it.
As far as I know, is it just as easy as uploading the new Identity Provider Certificate and we are all so? Does IT need to do anything on their end i.e. do something with the new metadata xml file after the update?

Thanks.
I am trying to update a field on the Quote (Operational_Start_Date__c) from the results of an aggregate result query.
The trigger runs on quote, queries QuoteLine for unique values and update the Quote with the unique values. This is what I have so far but it doesn't seem to be working;
 
trigger SB_QuoteAdditionalUpdates on SBQQ__Quote__c (before insert, before update) {
	
    	
    	Set<Id> quoteIds = new Set<Id>();
    
   		 for (SBQQ__Quote__c quotes : Trigger.new) {
   		 	
   		 		quoteIds.add(quotes.id);
   		 
   		 }
    	
    		List<AggregateResult> uniqueCountries = ([SELECT  Country_Operational_Date__c FROM SBQQ__QuoteLine__c WHERE SBQQ__Quote__c IN:quoteIds 
	    												AND country_code__c <> null AND Employee_CountFormula__c <> null GROUP BY Country_Operational_Date__c]);
    		
    		
    		if(uniqueCountries.Size()>0 ){
    			
    			
    			for (AggregateResult uniqueCountry : uniqueCountries){
    				
    				quotes.Operational_Start_Date__c = String.valueOf(uniqueCountry.get('Country_Operational_Date__c'));
    				system.debug('======>'+String.valueOf(uniqueCountry.get('Country_Operational_Date__c')));
    				
    			}      			
    		}
   		 
}



When I make the for loop run through the aggregate result (not optimized/bulkified), it updates the quote but it's only updating with one of the unique values and the quote might have had 3 unique values.
I am trying to update a field on the Quote (Operational_Start_Date__c) from the results of an aggregate result query.
The trigger runs on quote, queries QuoteLine for unique values and update the Quote with the unique values. This is what I have so far but it doesn't seem to be working;
 
trigger SB_QuoteAdditionalUpdates on SBQQ__Quote__c (before insert, before update) {
	
    	
    	Set<Id> quoteIds = new Set<Id>();
    
   		 for (SBQQ__Quote__c quotes : Trigger.new) {
   		 	
   		 		quoteIds.add(quotes.id);
   		 
   		 }
    	
    		List<AggregateResult> uniqueCountries = ([SELECT  Country_Operational_Date__c FROM SBQQ__QuoteLine__c WHERE SBQQ__Quote__c IN:quoteIds 
	    												AND country_code__c <> null AND Employee_CountFormula__c <> null GROUP BY Country_Operational_Date__c]);
    		
    		
    		if(uniqueCountries.Size()>0 ){
    			
    			
    			for (AggregateResult uniqueCountry : uniqueCountries){
    				
    				quotes.Operational_Start_Date__c = String.valueOf(uniqueCountry.get('Country_Operational_Date__c'));
    				system.debug('======>'+String.valueOf(uniqueCountry.get('Country_Operational_Date__c')));
    				
    			}      			
    		}
   		 
}

When I make the for loop run through the aggregate result (not optimized/bulkified), it updates the quote but it's only updating with one of the unique values and the quote might have had 3 unique values.
I am trying to build a trigger that does a few things and I was hoping I could get the best direction in handling this.

I have 2 objects ("Quote" and "QuoteLine") and a custom setting called "ServiceDate__c" which basically stores 2 information, Country__c and numberOfDays__c. The goal of the trigger is to query aCountry__c field on the QuoteLine object, compare it to country field on the ServiceDate__c object to get the number.
For Example, on the quote line, we store country names like USA. On the Custom setting, we have a map that stores Country, USA with a ServiceDate value of 50. 50 is the number of days that needs to be added to the close date on the quote line. So it's be closeDate 2016-01-20 + 50.

Finally, since there will be a number of closeDate__c fields on the QuoteLine, I would like to query only the UNIQUE CloseDate__c values and update the Quote object.

Sample code would be appreciated.

Tl:dr. Get unique date values on the Quote after calculation happens on the Quoteline object that references a custom setting for more information.

Here is what I have so a far;
 
trigger SB_QuoteAdditionalUpdates on SBQQ__Quote__c (before insert, before update) {

    Set<id> QuoteIds = New Set<id>();

    for (SBQQ__Quote__c SBQuotes : trigger.new){

            QuoteIds.add(SBQuotes.id);
            SBQQ__QuoteLine__c[] SBQuoteLines = [Select country__c, country_code__c, close_date__c, country_employee_construct__c, Employee_CountFormula__c from SBQQ__QuoteLine__c where id IN: QuoteIds];

            if(SBQuoteLines.size()>0){
                for(SBQQ__QuoteLine__c SBQuoteLine : SBQuoteLines ){

                    map<id, OperationalStartDate__c> NumberOfDaysMap = new map <id, OperationalStartDate__c>([select name, Number_Of_Days__c from OperationalStartDate__c where name =: SBQuoteLine.country__c ]);
        }
    }
}

}

 
We are trying to use SSO on 2 different domains that will connect to our SF org.Currently we have ADFS SAML setup to 1 but we adding another one. The question is, does SF support two ADFS servers in different forests providing SSO?

Thanks,
K

I want to prevent users from being redirected when they click a button and picklist value is false.

I have a custom button on Opportunity related list on account. If the value of Account type is 'OLD', users should get an error message and not redirect the page. If it's anything else, they can be redirected opportunity.

What is the best way of going about this?

Thanks, -Ken

I want to regularly send all account information from salesforce to another external system that will accept it as xml. I have the end point url for the external system and the fields that needs to be sent. 

How do I go about creating this? I assume I will have to schedule this to run daily at a particular time.

Please help.

 

Thanks.

I am creating a test class and the scenario I am testing requires an older date for the created date. I know CreatedDate is an audit field and I can't write to it. Is there a workaround I could use for writing my test class?

Thanks.

Hi there,

 

Does anyone know of a way of creating a multi-step approval process? I.e. When one approver approves it, case is sent to the next approver ( approver 2) then when approver 2 approves it, it goes to the last approver .



  1. Records enters entry criteria
  2. Approver 1 approves then
  3. Approver 2 approves after approver 1 has approved then
  4. Approver 3 approves after approver 2 has approved.
  5. Finalize.

Please let me know if this is possible. I am not sure if the appall process updates a specific field in the case object on every approval step.

 

Thanks.

Hi there,

 

I have this field that gets populated by an external service and I want to extract the number values from it then sum the numbers up.

For instance, see the text below

United Kingdom: 3, Ireland: 1, Netherlands: 1, Spain: 2, Australia: 1

 

I would like to extract 3,1,1,2,1 and sum them individually to have 8. i.e. 3+1+1+2+1 = 8.

 

Thanks.

I am trying to figure out the best way to prevent users from deleting and Account if it has a child account.

So the scenario will be the users will have to delete all the child accounts first before they can delete the parent.

Any guidance will be highly appreciated.

 

Thanks.

I have this query,

 

list<Contact> relatedContacts = [select id, AccountId, (Select Id From Cases) from Contact where id IN :contactIds ];

 

The thing is, I want to get the value of the cases Id  so I can use it to update another field.

 

How do I go about getting this value?

 

Thanks,

-K

 

Hi There,

 

I would like to query for the opportunity.ownerId of the opportunity from a quote using a trigger. (I.e. who is the owner of the opportunity tied to the current quote) How do I go about doing this in a trigger?

Can't seem to get anywhere. Please explain what you did a little.

 

Thanks a lot!

  • September 08, 2011
  • Like
  • 0
We are updating our SSO certificate and wanted to know if anyone has done it before and is there best practises on doing it.
As far as I know, is it just as easy as uploading the new Identity Provider Certificate and we are all so? Does IT need to do anything on their end i.e. do something with the new metadata xml file after the update?

Thanks.

I have deactivated one the recordtype we have and I still see the option when I create a new case i.e. under 'Available cases record types'

I deleted it without any issues and it just got rid of the name. I now see the id of the deleted recordtype.

Is there something I'm missing here to remove it from the available case record types?

I am trying to build a trigger that does a few things and I was hoping I could get the best direction in handling this.

I have 2 objects ("Quote" and "QuoteLine") and a custom setting called "ServiceDate__c" which basically stores 2 information, Country__c and numberOfDays__c. The goal of the trigger is to query aCountry__c field on the QuoteLine object, compare it to country field on the ServiceDate__c object to get the number.
For Example, on the quote line, we store country names like USA. On the Custom setting, we have a map that stores Country, USA with a ServiceDate value of 50. 50 is the number of days that needs to be added to the close date on the quote line. So it's be closeDate 2016-01-20 + 50.

Finally, since there will be a number of closeDate__c fields on the QuoteLine, I would like to query only the UNIQUE CloseDate__c values and update the Quote object.

Sample code would be appreciated.

Tl:dr. Get unique date values on the Quote after calculation happens on the Quoteline object that references a custom setting for more information.

Here is what I have so a far;
 
trigger SB_QuoteAdditionalUpdates on SBQQ__Quote__c (before insert, before update) {

    Set<id> QuoteIds = New Set<id>();

    for (SBQQ__Quote__c SBQuotes : trigger.new){

            QuoteIds.add(SBQuotes.id);
            SBQQ__QuoteLine__c[] SBQuoteLines = [Select country__c, country_code__c, close_date__c, country_employee_construct__c, Employee_CountFormula__c from SBQQ__QuoteLine__c where id IN: QuoteIds];

            if(SBQuoteLines.size()>0){
                for(SBQQ__QuoteLine__c SBQuoteLine : SBQuoteLines ){

                    map<id, OperationalStartDate__c> NumberOfDaysMap = new map <id, OperationalStartDate__c>([select name, Number_Of_Days__c from OperationalStartDate__c where name =: SBQuoteLine.country__c ]);
        }
    }
}

}

 

I want to prevent users from being redirected when they click a button and picklist value is false.

I have a custom button on Opportunity related list on account. If the value of Account type is 'OLD', users should get an error message and not redirect the page. If it's anything else, they can be redirected opportunity.

What is the best way of going about this?

Thanks, -Ken

I want to regularly send all account information from salesforce to another external system that will accept it as xml. I have the end point url for the external system and the fields that needs to be sent. 

How do I go about creating this? I assume I will have to schedule this to run daily at a particular time.

Please help.

 

Thanks.

I am creating a test class and the scenario I am testing requires an older date for the created date. I know CreatedDate is an audit field and I can't write to it. Is there a workaround I could use for writing my test class?

Thanks.

Hi there,

 

I have this field that gets populated by an external service and I want to extract the number values from it then sum the numbers up.

For instance, see the text below

United Kingdom: 3, Ireland: 1, Netherlands: 1, Spain: 2, Australia: 1

 

I would like to extract 3,1,1,2,1 and sum them individually to have 8. i.e. 3+1+1+2+1 = 8.

 

Thanks.

I have this query,

 

list<Contact> relatedContacts = [select id, AccountId, (Select Id From Cases) from Contact where id IN :contactIds ];

 

The thing is, I want to get the value of the cases Id  so I can use it to update another field.

 

How do I go about getting this value?

 

Thanks,

-K

 

Hi all,

 

I am new to Salesforce.

 

What is the " Integration" in Salesforce.com, What we can do in Integration?

 

Can you please Help Me..

 

Thanks for your Help..

Hi There,

 

I would like to query for the opportunity.ownerId of the opportunity from a quote using a trigger. (I.e. who is the owner of the opportunity tied to the current quote) How do I go about doing this in a trigger?

Can't seem to get anywhere. Please explain what you did a little.

 

Thanks a lot!

  • September 08, 2011
  • Like
  • 0
Hi,
Is there any way to convert String /Sentence to Title Case in Apex.

Convert From
"this is a sentence"
To
"This Is A Sentence"


Thanks
R


  • April 06, 2008
  • Like
  • 0