cancel
Showing results for 
Search instead for 
Did you mean: 

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

developerone
Contributor
0 Kudos

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

gregorw
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

ie is caching the ajax call.

change method to post, you should be good.

developerone
Contributor
0 Kudos

Thanks a lot Jun Wu. This fixed the problem.

Answers (1)

Answers (1)

developerone
Contributor
0 Kudos

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