0

We have a mobile app(Not Salesforce1) where the data is pulled from Salesforce using REST API.

The basic functionality of the app is to return GranChild records when any Search Term is entered in the Search box. If any of the search term matches with the child record of child record(Grandchild of Logged in User), then it should return the record. It used to work fine till last week.

Since then, when we search for any user by inputting any search term, it is retruning only child records but not grandchild records.

It was designed back in 2016 and the code related to this was untouched. When we tried to debug the queries in debug log, we found that there are around 200 records with the search name given but in Postman or Mobile App, we are recieving only 1 record.

As the code is unchanged or untouched, is there anything to do with API version as the API version of REST API class in production is 29. Is it due to this version, are we getting limited results?

As this is related to production, user are getting frustrated due to limited functionality. Can anyone please guide me where did it went wrong?

Thanks

1

It is difficult to figure out why and what is happening without more information. But, you may get lucky and find other users facing the same issue. Meanwhile, the following notes may be worth your time.

Although you may not have "touched" the code, any and all peripheral functions may have influenced the way results are generated.

  1. Was there any patch - from Salesforce or from your team, applied during this timeline?
  2. What is the code to generate the response (where you see 200+ in results, but only one in the JSON)
  3. Are you able to reproduce error in other environments using Postman?
  4. API version by itself may not be causing the problem, but what happens when you change the API version (in UAT for example) and test? You may break functionality depending on what is used in your code.
  • Thanks Prashanth. Yes I can see the response in Sandbox. When tested in Sandbox, I found that there are several records returned w.r.t the search term used. But in Prod, when we are testing we can only see 1 record. Yes I can test this in Postman and there only we found that only 1 record being returned for Prod API. We have updated lot of functionalities in Prod but they are no where related to this API class or mapping class. Is there anything to do with process builders or validations rules that are reducing functionality of API? Please suggest – S kanth Apr 20 at 9:52
  • And the API version used in Sandbox is 42.0 and Production is 37.0. Will this affect any data? Is 37.0 the latest one? Or do I need to update that to 42? – S kanth Apr 20 at 11:57
  • Hmm.. API versions must be the same or you should have a migration plan (for another day I guess). You did say that debugging in PROD gives you XX records, but only one record is returned in Postman, didn't you? Can you change API version in Sandbox to 37 and replicate the same behaviour? Just a fyi: You can use the following command to see supported APIs. curl https://<instance-name-in-url>.salesforce.com/services/data/ I may not be able to help without knowing the logic/code - sorry. Probably someone who has seen this issue before can comment. – Prashanth K Apr 20 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.