• Subham Agarwal 19
  • NEWBIE
  • 30 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
For callouts to an external app from Salesforce I need to add tokens to the REST endpoint url.
 
request.setEndpoint('https://www.externalapp.com/?token=XXXXXXXX&software_token=YYYYYYYY');

I was wondering what the best practice is to store these tokens in Salesforce. These tokens will be different for every salesforce instance that will use the code to callout to this external app. Also I am curious how I should change my code to retrieve the stored tokens.
I have a complete metadata package which is local to my system. The requirement here is to validate the package across different orgs and get the package coverage without deploying the code.I just want to have the coverage report (lines covered, uncovered, percentage, etc). 
Appreciate your time!
 
Hello,
I am having difficulty adding a number to a set, then once it is set how do I add 1 to that number?

Code below; I receive error on line 3 of: void add(Decimal) from the type Set<Integer>
and error on line 11 of: void valueOf(Set<Integer>) from the type assign, which is directly related to line 3 not being set
Set<Integer> assignid = new Set<Integer>();
    for(Lead lead : [SELECT AssignIDDateTime__c, Assignment_ID__c FROM Lead WHERE AssignIDDateTime__c != null ORDER BY AssignIDDateTime__c DESC LIMIT 1]){
        assignid.add(lead.Assignment_ID__c);
    }
    
    for(Lead l : Trigger.new){
        if(l.Status == 'Underwriting'){
	        if(l.AssignIDDateTime__c == null){
            	l.Assignment_ID__c = decimal.valueOf(1);
            }else{
                l.Assignment_ID__c = decimal.valueOf(assignid) + decimal.valueOf(1);
            }
        }

    }
Thank you!
For callouts to an external app from Salesforce I need to add tokens to the REST endpoint url.
 
request.setEndpoint('https://www.externalapp.com/?token=XXXXXXXX&software_token=YYYYYYYY');

I was wondering what the best practice is to store these tokens in Salesforce. These tokens will be different for every salesforce instance that will use the code to callout to this external app. Also I am curious how I should change my code to retrieve the stored tokens.
Hi,

My task is to integrate salesforce with externl website using REST. & they have given me JSON Response code for fields in external website.

I am able to hit the External system URL. I was Struct here...!  and how we can get data from external website & how to code for that...?
Like whenever a user enter their account details in external website, those data should also get into salesforce accounts.

How we can achieve this...?
can anyone help for this scenario...!

 
  • March 22, 2016
  • Like
  • 2