Forum Discussion
MCFNeil
8 years agoQrew Captain
Sorry for the mix up.
Because URLs are naturally a GET request (to pull information from the server), but the refresh is a server side action. We need to use a POST to initiate the refresh.
So your formula URL button would be:
Because URLs are naturally a GET request (to pull information from the server), but the refresh is a server side action. We need to use a POST to initiate the refresh.
So your formula URL button would be:
"javascript:$.post('https://mydomain.quickbase.com/qb/sync/refreshTasks?replicationID=12345').then(function(res,code) {console.log(res,code);window.location.reload()})"
- KeithWeber7 years agoQrew MemberI have the same error as JoJo when trying this solution. The URL works for my Administrator account for not for any other person. It works if I "Test as" them or their role however.
Edit: For anyone else having the same issue that JoJo and myself had I found the issue to be that the user clicking the Refresh URL needs to have delete rights in that table for their assigned role. I had not given delete rights since the user couldn't actually delete the sync'd projects anyway. - MCFNeil8 years agoQrew CaptainKeep in mind that sometimes the refresh action on the server takes longer than the refresh action in the browser. So you might have to manually refresh the browser after a bit to see the updated information.
- QuickBaseCoachD8 years agoQrew CaptainThx Matthew, much appreciated Community Contribution.
- anthony3123anth8 years agoQrew TraineeThanks Matthew, I can confirm your solution works perfectly!
I have implemented using the following formula URL button:"javascript:$.post('https://mydomain.quickbase.com/qb/sync/refreshTasks?replicationID=12345', function(){location.reload(true);}); void(0);"
- AnureshPuthukud8 years agoQrew TraineeHi, how can i run this script outside quickbase? Like an external HTML file?
- StepanGurov8 years agoQrew CadetThanks a lot for advise. It works!
Just three questions:
1. Am I right, that after sending two consecutive Post commands for refreshing two separate tables the second will terminate the first one? Is there a way to somehow divide them so they won't interfere?
2.Is there a way to somehow check that refresh have been completed so it could be read programmatically?
3. Could you please also shortly explain what is the purpose of the ending of script input:
.then(function(res,code) {console.log(res,code);window.location.reload()})
? - StepanGurov8 years agoQrew CadetWell, Matthew Neil | CirrusOps, nevermind, i've made it miself :)
Looks like "window.location.reload" just reloading the page after the Post request have been processed.
So I've replaced "window.location.reload" with "window.location.href = 'some url' " to force browser to navigate to other page and then just repeatedly checking if this page is already loaded (I'm operating from VBA macro so only little straight JS methods works for me :)
After the page is on - I just send the next refresh request - JoJoDeSimone8 years agoQrew MemberHi, I set this up as detailed and it works for admin users however I get the following error when using the URL with a non admin user. If anyone else seeing this error in the sync history or is there something setup incorrectly? We are using an SFTP connection
There was a problem refreshing the table. Refresh started by Kevin Reese was unable to start. The error was Quick Base application XXXXXXXXXXXXX not found for user YYYYYYYY - RicardoSendra__7 years agoQrew TraineeDoes anyone have a sample code to accomplish this in Python 2? I'm new to working with Web data and this would save me some research time...
Thanks,
I'll Post when/if I get his working in Python.. - MeredithMoore57 years agoQrew Assistant CaptainSo color me derp, but I am looking to refresh the two child tables under the parent table. Button is on the parent table. How might I do this?