Page 1 of 2
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 1:02 am
by supriya hirurkar
I am making a tablet app, wherein I have a list of accounts on the master side and the details should appear on the detail side after clicking on the list.
My configurations are as follows:
On master side of list of accounts, I custom create the JS as 'element.attr("data-sf-id",value.id);'
In the detail service, I store the id as a local storage parameter which is a part of my request url
On the design of master side, on the click even of list, I put custom JS as 'localStorage.setItem("Aid",$(this).attr("data-sf-id"));', where Aid is my local storage variable in detail request. On the same event, I set my detail content.
-Lastly, on the load of the detail page, I invoke detail service.
MY authenticatino and Json response are correct but when I get 'Failed to load resource: the server responded with a status of 401 (Unauthorized) ' error.
I am unable to figure out what could be the issue. I look forward to the help.
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 3:20 am
by maxkatz
Can you post a screen shot of services' Settings and Request tabs?
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 3:39 am
by supriya hirurkar
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 3:42 am
by maxkatz
Authorization should be: Bearer
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 3:42 am
by supriya hirurkar
Thanks Max. I am not using Service here. I created an Oauth by using my username and password.
And as I mentioned in the post before, I am using the Account id from the master list, storing the account id in local storage using parameter Aid from the request of the detail side.
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 3:57 am
by supriya hirurkar
Max, I am returning "Bearer" + value for access token.
It did not resolve the issues. salesforce is not generating debug logs for the requests I am making from the app. So, I am not able to figure where is the error exactly. Although all other services which I have created are working fine except for this master-detail relationship
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 7:27 am
by Kateryna Grynko
Issue in fetching the data on the detail side of the app.
Posted: Mon Sep 16, 2013 6:58 pm
by supriya hirurkar
Hello Katya and Max, thanks for all your help.
there was some issue with the request parameters of the url. Got it working!
Thanks again for the wonderful cloud editor and all the instant help.
Issue in fetching the data on the detail side of the app.
Posted: Thu Sep 19, 2013 5:56 pm
by supriya hirurkar
Hello, I had got it working as I wanted but the functionality has suddenly disappeared and there was no change from my side. This morning when I opened appery, the look of the app was changed and this detail side data pulling stopped working.
I checked all my code and services, all are in place. I also restored my changed source file.
Please help on this. Not sure if the changed UI has caused this.
There was no error in the console. It is very frustrating to see it stopped working like this.
Issue in fetching the data on the detail side of the app.
Posted: Thu Sep 19, 2013 6:12 pm
by Maryna Brodina
Hello! Could you clarify what do you mean ob "the look of the app was changed"? What exactly doesn't work?