Skip to Content
0

Button calling function import works in chrome but not in internet explorer

May 08 at 03:19 PM

95

avatar image

Hello,

I have created a button to call function import which basically sends an email to the selected recipient. I'm seeing a different behavior in IE compared to chrome.

When I click the send button multiple times the email is sent multiple times in chrome. When I do the same in IE the email is sent only once i.e. the first time.

I have placed a break point in the back end system and noticed that the calls are not happening in case of IE. The calls are made every time I click the button using chrome.

I have debugged this in both browsers and the function import returns an OK response in both cases.

Has anyone faced this issue before.

Thank You,

Kabir

10 |10000 characters needed characters left characters exceeded

It would be easier to help you when you can provide some sample code i.e. on GitHub using abapGit & WebIDE Git integration.

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Jun Wu May 08 at 05:29 PM
0

ie is caching the ajax call.

change method to post, you should be good.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks a lot Jun Wu. This fixed the problem.

0
Kabir Siddarth May 08 at 05:19 PM
0

Hello Gregor,

Thanks for your response. Here is the code:

sap.ui.controller("cus.crm.mycalendar.CRM_MYCALExtension.view.AppointmentDetailCustom", {
	onEmail: function(e) {
		debugger;
		var oModel = e.getSource().getModel();
		var guid = this.getView().getBindingContext().getObject().Guid;
		var emailPartners = this.getView().getBindingContext().getObject().EmailPartners;
		if (emailPartners === "") {
			sap.m.MessageToast.show("Please maintain an email");
		} else {
			oModel.callFunction("Email", // function import name
				"GET", // http method
				{
					Guid: guid
				},
				null,
				function(oData, response) {
					sap.m.MessageToast.show("Email has been sent");
				}, // callback function for success
				function(oError) {
					sap.m.MessageToast.show("Email could not be sent");
				}); // callback function for error
		} // endif
	}
});

Thank You,

Kabir

Share
10 |10000 characters needed characters left characters exceeded