• Yiqin
  • NEWBIE
  • 35 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
Hello,

I have a problem with calling the API REST on my Sandbox. The API calling stopped working sundenly. 

The API is working well on my live environment.

I tested the API using SoapUI and i have no problem with the live environment but the same problem with the Sandbox.

I checked every parameter (username, pwd, client id, client secret, the authorisation key and grant type) and always the same error.

I even tried with a different endpoint by replacing the test by the domain i see when i connect to my Sandbox (https://test.salesforce.com).

I also tried with a new fresh Sandbox. But always the same error.

Can you please help ?

Here's the request :
POST https://test.salesforce.com/services/oauth2/token?client_id=XXXXXX&client_secret=XXXXX&username=XXXXX&password=XXXXYYYYY&grant_type=password HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: test.salesforce.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)


Here's the error i get : 

{
   "error": "unknown_error",
   "error_description": "retry your request"
}

HTTP/1.1 400 Bad Request
Date: Thu, 04 Aug 2016 10:21:00 GMT
Strict-Transport-Security: max-age=10886400; includeSubDomains; preload
Content-Security-Policy-Report-Only: default-src https:; script-src https: 'unsafe-inline' 'unsafe-eval'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /_/ContentDomainCSPNoAuth?type=login
Set-Cookie: BrowserId=tF38uGqgQseAw5QjqMIJaA;Path=/;Domain=.salesforce.com;Expires=Mon, 03-Oct-2016 10:21:00 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache, no-store
X-ReadOnlyMode: false
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked

{"error":"unknown_error","error_description":"retry your request"}
 
I have 3 picklists as
1st picklist to show all objects (standard or custom)
2nd picklist to show only picklist fields related to selected object from 1st picklist
3rd picklist to show all values of that picklist field that I'hv selected from 2nd picklist

now the actual problem is my first 2 picklists are working and providing the desired result, but 3rd picklist is not showing the values based on the 2nd picklist

Many Thanks in Advance . . .
 
Hi there,

I'm developing an integration between my app and a Salesforce Instance for a customer.

I have it working nicely when connecting to my Developer account (logging in at https://login.salesforce.com)

I have just created a Sandbox account from my client's Salesforce account with the aim to test and deploy. The problem is that when I make an authentication attempt via REST API to the sandbox endpoint (https://test.salesforce.com), I get back the error 'retry your request'. Obviously, I've retried and no-go.

To check I changed the password and it correctly tells me that the credentials are incorrect, so it's not that.

I'm not quite sure what else I'm doing wrong as my code works fine on the developer account.

I have read many forum articles, and tried a number of suggestions to no avail. I tried changing the login endpoint from login.sales... to cs31.salesfor... as per my sandbox instance.

Any suggestions would be very much appreciated.
Hello,

I have a problem with calling the API REST on my Sandbox. The API calling stopped working sundenly. 

The API is working well on my live environment.

I tested the API using SoapUI and i have no problem with the live environment but the same problem with the Sandbox.

I checked every parameter (username, pwd, client id, client secret, the authorisation key and grant type) and always the same error.

I even tried with a different endpoint by replacing the test by the domain i see when i connect to my Sandbox (https://test.salesforce.com).

I also tried with a new fresh Sandbox. But always the same error.

Can you please help ?

Here's the request :
POST https://test.salesforce.com/services/oauth2/token?client_id=XXXXXX&client_secret=XXXXX&username=XXXXX&password=XXXXYYYYY&grant_type=password HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Host: test.salesforce.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)


Here's the error i get : 

{
   "error": "unknown_error",
   "error_description": "retry your request"
}

HTTP/1.1 400 Bad Request
Date: Thu, 04 Aug 2016 10:21:00 GMT
Strict-Transport-Security: max-age=10886400; includeSubDomains; preload
Content-Security-Policy-Report-Only: default-src https:; script-src https: 'unsafe-inline' 'unsafe-eval'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /_/ContentDomainCSPNoAuth?type=login
Set-Cookie: BrowserId=tF38uGqgQseAw5QjqMIJaA;Path=/;Domain=.salesforce.com;Expires=Mon, 03-Oct-2016 10:21:00 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache, no-store
X-ReadOnlyMode: false
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked

{"error":"unknown_error","error_description":"retry your request"}
 
Hello,

I am updating a Visualforce page , which is a part of a Force.com Comunity site.  The site is an application that propsective students complete to apply for admission to my organizaition, so there is a login created for each student.  The first Visualforce page is called MyProfile, and it includes the following code:
 
<!-- Starting of Personal Data Section Fields List -->
                <apex:pageBlockSection collapsible="false" id="personalData" columns="1" > 
                    <apex:outputPanel layout="block" style="float:left;" id="studentDiv1" styleClass="studentDiv1">
                        <apex:repeat value="{!PersonalDataFields}" var="studentInfo">
                            <apex:pageBlockSection >
                                <apex:pageblocksectionItem rendered="{!studentInfo.fieldPath != 'Birthdate_WC__c' && studentInfo.fieldPath != 'Other_Last_Names_Used__c' && studentInfo.fieldPath != 'Other_Last_Names__c' && studentInfo.fieldPath != 'SSN1__c'}">
                                    <apex:outputLabel value="{!mapFieldLabels[studentInfo.fieldPath]}" style="text-align: left;" />
                                    <apex:inputField styleClass="form-control"   label="" value="{!student[studentInfo.fieldPath]}" required="{!OR(studentInfo.required,studentInfo.dbrequired)}"   />
                                </apex:pageblocksectionItem>

What I don't understand is what the {!PersonalDataFields} is referring to.  From the controller class for this visualforce page, I see several public variables available to the visualforce page, but nothing by the name PersonalDataFields.  Here's the first few lines from the controller class.
 
public class MyInformationController { 
    public Contact student {get;set;}
    public EnrollmentrxRx__Enrollment_Opportunity__c currentApplicationInfo {get;set;}// current application which user has applied for  
    public Map<String, String> mapFieldLabels {get;set;}// map contains field api name and corresponding label name
    public Map<String, String> mapCitizenshipFieldLabels {get;set;}// map contains field api name and corresponding label name
    public Map<String, String> mapAddressFieldLabels {get;set;}// map contains field api name and corresponding label name
    public Map<String, String> mapEnrollmentQuestionFieldLabels {get;set;}// map contains field api name and corresponding label name
    public Map<String, String> mapContactFieldLabels {get;set;}// map contains field api name and corresponding label name
    public Boolean isPermSameAsPres {get;set;}
    public String reactivateTermId {get;set;}
    public Boolean isReactivateTerm {get;set;}
    public String StudentTypeValue {get; set;}

There is one function in the controller that claims to get these fields, but I don't see them stored in a variable by the correct name where this is called in the controller class.  Here is that function:
 
/*Function for fetch Perosnal Data Field Labels Information*/
    public List<schema.fieldsetmember> getPersonalDataFields(){
        return PortalUtility.getFields('Contact', 'PersonalDataSet');
    }

Is there somewhere else where the variable {!PersonalDataFields} could be located, or is it somehow created inside the controller class without specifically declaring it as a public variable?

Thanks!
I am trying to create a field which would count number of activities starting August 1, 2016.  However, I would want it to stop counting once 'Specific' field within Activities is selected as Conversation.

What I am trying to accomplish is having 7 touches (emails, voicemails, dials) one one Account labelled Type = Top X.  Once 7 touches and a conversation did NOT take place, I would remove these Accounts from the bucket and place it under different one Type = Nurture.  
But before or on the 7th touch, if a conversation did take place (Specific = Conversation), I want to keep them under the Top X Bucket.  

Changing the bucket I can do manually, but I do require the counter field.  
Is this possible to do with APEX?  I have created counter field before, but I have never done something with a date and the counter stopping at a specific time.

Any help is appreciated!
For example - we have ABC opportunity and having AA, BB, CC products in that opportunity. Now Sales rep won the opportunity and customer wants to purchase only AA and CC product and don't want the BB product. Here Sales rep will delete the BB product from the opportunity and close the deal as "Closed Won"

PROBLEM: Mgt wants the report of the deals with closed lost status. How I can address such issues in my reporting if sales rep delete the products from the opportunity if customer doesn't want them. Logically those are opp lost but not able to track them via reporting.