Skip to content

Instantly share code, notes, and snippets.

@maranemil
Last active August 29, 2015 14:18
Show Gist options
  • Save maranemil/bf2aa32fadefe8f74d75 to your computer and use it in GitHub Desktop.
Save maranemil/bf2aa32fadefe8f74d75 to your computer and use it in GitHub Desktop.
SugarCRM7 Ajax Request
$.ajax({
beforeSend: function (request) {
request.setRequestHeader("OAuth-Token", SUGAR.App.api.getOAuthToken());
},
url: "rest/v10/cplus_ContactsPlus/create_cplus",
data: { type: "cplus", societyname: this.model.get('name') },
dataType: "json",
type: "GET",
success: function (data) {
var obj = jQuery.parseJSON(data);
//console.debug(obj)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment