-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
6Questions
-
4Replies
Can't see parameters in Rest HTTP doGet Method
Hi Expert,
I can not get phoneNumber in testing. but it is working in WorkBeach
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
String phoneNumber = req.params.get('phoneNumber');
String subscriptionId = req.params.get('subscriptionId');
system.debug('phoneNumber : '+ phoneNumber) ;
return response;
}
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999 1234567891 0488888888';
req.httpMethod = 'GET';
RestContext.request = req;
String result=NewsSubscriptionController.doGet();
test.stopTest();
}
I can not get phoneNumber in testing. but it is working in WorkBeach
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
String phoneNumber = req.params.get('phoneNumber');
String subscriptionId = req.params.get('subscriptionId');
system.debug('phoneNumber : '+ phoneNumber) ;
return response;
}
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999 1234567891 0488888888';
req.httpMethod = 'GET';
RestContext.request = req;
String result=NewsSubscriptionController.doGet();
test.stopTest();
}
-
- seamas li
- October 27, 2015
- Like
- 0
- Continue reading or reply
Can not get REST API request params when testing
Hi Expert,
Why I can not get phoneNumber parameter?
Thank you so much.
I am testing Rest Api Apex code:
@RestResource(urlMapping='/mytest/*')
global with sharing class salesforceRestCall{
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
system.debug(' RestContext.request.params :: '+ RestContext.request.params);
String phoneNumber=req.params.get('subscriptionId');
String response = processRequest( phoneNumber);
return response;
}
Testing Apex class:
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999';
req.httpMethod = 'GET';
RestContext.request = req;
RestContext.response= res;
String susbscriptionDetail = salesforceRestCall.doGet();
test.stopTest();
}
Why I can not get phoneNumber parameter?
Thank you so much.
I am testing Rest Api Apex code:
@RestResource(urlMapping='/mytest/*')
global with sharing class salesforceRestCall{
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
system.debug(' RestContext.request.params :: '+ RestContext.request.params);
String phoneNumber=req.params.get('subscriptionId');
String response = processRequest( phoneNumber);
return response;
}
Testing Apex class:
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999';
req.httpMethod = 'GET';
RestContext.request = req;
RestContext.response= res;
String susbscriptionDetail = salesforceRestCall.doGet();
test.stopTest();
}
-
- seamas li
- October 23, 2015
- Like
- 0
- Continue reading or reply
Rest API request params is null when Testing
Hi Expert,
I am testing Rest Api Apex code:
@RestResource(urlMapping='/mytest/*')
global with sharing class salesforceRestCall{
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
system.debug(' RestContext.request.params :: '+ RestContext.request.params);
String phoneNumber=req.params.get('subscriptionId');
String response = processRequest( phoneNumber);
return response;
}
Testing Apex class:
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999';
req.httpMethod = 'GET';
RestContext.request = req;
RestContext.response= res;
String susbscriptionDetail = salesforceRestCall.doGet();
test.stopTest();
}
Why I can not get phoneNumber parameter?
Thank you so much.
I am testing Rest Api Apex code:
@RestResource(urlMapping='/mytest/*')
global with sharing class salesforceRestCall{
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
system.debug(' RestContext.request.params :: '+ RestContext.request.params);
String phoneNumber=req.params.get('subscriptionId');
String response = processRequest( phoneNumber);
return response;
}
Testing Apex class:
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999';
req.httpMethod = 'GET';
RestContext.request = req;
RestContext.response= res;
String susbscriptionDetail = salesforceRestCall.doGet();
test.stopTest();
}
Why I can not get phoneNumber parameter?
Thank you so much.
-
- seamas li
- October 23, 2015
- Like
- 0
- Continue reading or reply
Flow Plugin OutputParameter
Hi,
I have requirement, in a flow plugin send a http request and get a Object List response.
I need pass the Object list to flow as OutputParameter, How can I do it?
Thank you so much
I have requirement, in a flow plugin send a http request and get a Object List response.
I need pass the Object list to flow as OutputParameter, How can I do it?
Thank you so much
-
- seamas li
- September 19, 2015
- Like
- 0
- Continue reading or reply
Move the Send an Email button to top of Cases page next to Edit button
Hi Experts
I want to move Send an Email button from related list to top of Cases detail page, and near to Edit button(standard button).
Or Can I create a Custom button has same function and behavior with Send an Email button?
Because the Send an Email button always in the bottom of the screen, it is hard to find.
Thanks you so much.
I want to move Send an Email button from related list to top of Cases detail page, and near to Edit button(standard button).
Or Can I create a Custom button has same function and behavior with Send an Email button?
Because the Send an Email button always in the bottom of the screen, it is hard to find.
Thanks you so much.
-
- seamas li
- August 21, 2015
- Like
- 1
- Continue reading or reply
Eclipse IDE connect to test.salesforce.com
Hi Experts
I am trying to load Apex/pages from SFDC Sandbox to Force prokect. But I always get the following error message.
Unable to connect to hostname 'test.salesforce.com' with given login credentials
My user name:seamas.li@news.com.au.primarydev
Please help check, much appriaciate.
I am trying to load Apex/pages from SFDC Sandbox to Force prokect. But I always get the following error message.
Unable to connect to hostname 'test.salesforce.com' with given login credentials
My user name:seamas.li@news.com.au.primarydev
Please help check, much appriaciate.
-
- seamas li
- August 08, 2015
- Like
- 0
- Continue reading or reply
Move the Send an Email button to top of Cases page next to Edit button
Hi Experts
I want to move Send an Email button from related list to top of Cases detail page, and near to Edit button(standard button).
Or Can I create a Custom button has same function and behavior with Send an Email button?
Because the Send an Email button always in the bottom of the screen, it is hard to find.
Thanks you so much.
I want to move Send an Email button from related list to top of Cases detail page, and near to Edit button(standard button).
Or Can I create a Custom button has same function and behavior with Send an Email button?
Because the Send an Email button always in the bottom of the screen, it is hard to find.
Thanks you so much.
-
- seamas li
- August 21, 2015
- Like
- 1
- Continue reading or reply
Can not get REST API request params when testing
Hi Expert,
Why I can not get phoneNumber parameter?
Thank you so much.
I am testing Rest Api Apex code:
@RestResource(urlMapping='/mytest/*')
global with sharing class salesforceRestCall{
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
system.debug(' RestContext.request.params :: '+ RestContext.request.params);
String phoneNumber=req.params.get('subscriptionId');
String response = processRequest( phoneNumber);
return response;
}
Testing Apex class:
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999';
req.httpMethod = 'GET';
RestContext.request = req;
RestContext.response= res;
String susbscriptionDetail = salesforceRestCall.doGet();
test.stopTest();
}
Why I can not get phoneNumber parameter?
Thank you so much.
I am testing Rest Api Apex code:
@RestResource(urlMapping='/mytest/*')
global with sharing class salesforceRestCall{
@HttpGet
global static String doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
system.debug(' RestContext.request.params :: '+ RestContext.request.params);
String phoneNumber=req.params.get('subscriptionId');
String response = processRequest( phoneNumber);
return response;
}
Testing Apex class:
static testMethod void getSubscriptionByPhoneNumberTest() {
test.startTest();
RestRequest req = new RestRequest();
RestResponse res = new RestResponse();
req.requestURI = '/services/apexrest/subscriptions?phoneNumber=416360999';
req.httpMethod = 'GET';
RestContext.request = req;
RestContext.response= res;
String susbscriptionDetail = salesforceRestCall.doGet();
test.stopTest();
}
- seamas li
- October 23, 2015
- Like
- 0
- Continue reading or reply
Move the Send an Email button to top of Cases page next to Edit button
Hi Experts
I want to move Send an Email button from related list to top of Cases detail page, and near to Edit button(standard button).
Or Can I create a Custom button has same function and behavior with Send an Email button?
Because the Send an Email button always in the bottom of the screen, it is hard to find.
Thanks you so much.
I want to move Send an Email button from related list to top of Cases detail page, and near to Edit button(standard button).
Or Can I create a Custom button has same function and behavior with Send an Email button?
Because the Send an Email button always in the bottom of the screen, it is hard to find.
Thanks you so much.
- seamas li
- August 21, 2015
- Like
- 1
- Continue reading or reply
Enable Lightning App Builder
I don't see a Setup menu to run the Lightning App Builder for a challange. I'm using the Summer `15 Developer Edition. How is it enabled?
- Lewis Richardson
- July 07, 2015
- Like
- 1
- Continue reading or reply