+ Start a Discussion
Christian Monje 4Christian Monje 4 

Salesforce- SAP Integration using trigger

My name is Christian and I am a beginner in Salesforce - Sap integrations development, in my project, we have the next requirement:
  • When an account is registered in Salesforce an instant call is made to a web service developed in SAP (SOAP).
    • If the integration result is right, you should be able to insert the account into Salesforce, but if the integration result returns any errors, you should display the error on the screen, so that the user can correct any errors and try again to register the account. My application is using the standard VisualForce Page.
So I had the idea of using a trigger (before insert) but as far as I've read this it's not possible, can anyone give me some guidance on how to approach the development?
Thank you very much.

Andy on CloudAndy on Cloud
Did you mean you are using Standard page or Visualforce page (custom page)? If you are using custom page, you simply do the integrations in your Controller or extension class.  If you are using standard page, it depends on how the account is registered.
Christian Monje 4Christian Monje 4
Hello thank you very much for the answer, my project is using standard pages so I can not overwrite buttons or actions.
Andy on CloudAndy on Cloud
Perhaps it's your requirement not to override the button but just in case you know that you can actually override standard buttons, write JavaScript code there to perform standard and custom function.

But before I move on, I want to understand the pre-conditions of your requirements first.  When you say you have to use standard page and it should give error without inserting account into Salesforce.com, then it means without successfully validation from SAP, this account is not inserted, then where does the beginning of this process take place?  Account List View? or Landing page?