+ Start a Discussion
Love SFDCLove SFDC 

Prompting the user after a aynch web service call

I've a requirement where I need to send some attachments tied to an account to an external inhouse application, with a button 'Send attachments'. To use the maximum size of SOAP request for an async call (12 MB) we want to make an asynch web service call using @future method. We've provided an inbound webservice for the external team to consume and update SFDC database with the status(success/failed) of the attachment upload, in the external database. How can I prompt the user once the external webservice updates the sfdc database letting him know the status of the document submission ? Any pointers on this that will have a better user experiencew are much appreciated.
Thanks in advance.
AshlekhAshlekh
Hi,

If your "Send Attachments" button is on Custom Page and user has click on this button, now you are calling a @future method which do it's work.
Now the external application update the value in same record which is opened in you Custom page then you can use "Push Notifcation" functionality on page. Pust Notification let you know that reocrd has been updated and you can trigger any function based on this.

If you button is on Standard page than you have to create a VFP and use this page as a inline on Standard page and use PUSH notification on VFP. 

Last you can send email to user that attachment has failed or success fully uploaded.

PUSH Notification- https://developer.salesforce.com/page/Alert!_Salesforce_Event_Notification_Designs_for_Force.com_Apps

-Thanks
Ashlekh Gera