Tuesday, 30 April 2013

SugarCRM REST API example with javascript


This blog post explains how to login to SugarCRM instance through javascript

Let's have an example of REST API through JavaScript.

Create an html file to include javascript, We will require jquery. Provide correct Javascript path in HTML file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>SugaRCRM REST API Example through Javascript</title>
        <script src='jquery.js'></script>
        <script src='rest.js'></script>
    <body >
        <div class="hd">SugaRCRM REST API Example through Javascript</div>

Now create a rest.js

var api_url = "<SUGAR_URL>/service/v2/rest.php";
var user_name = '<USERNAME>';    //SugarCRM username
var password = '<PASSWORD>';    //SugarCRM password

var params = {
    application: 'SugarCRM RestAPI Example'
var json = JSON.stringify(params);
        url: api_url,
        type: "POST",
        data: { method: "login", input_type: "JSON", response_type: "JSON", rest_data: json },
        dataType: "json",
        success: function(result) {
             if(result.id) {
                    //HERE: you will have out put from rest
                alert("sucessfully LOGIN Your session ID is : " + result.id);
        error: function(result) {

On success you will get response of login method, successful or failure.

Friday, 26 April 2013

meeting Map Reminder

meeting Map Reminder


Impress your sales rep by reminding them important meetings planned for the day, with map!! Set up a scheduler and you are sorted! Sales Rep receives an email with map and meeting details.

How to install?

Download plug-in from http://www.sugarforge.org/projects/mmr/ from downloads tab.

Install plug-in using Module Loader, Admin > Module Loader.

P.S. Assumed you have installed cron job already. 

Create Scheduler

After successful installation, go to Admin > Scheduler > Create Scheduler > Select “Meeting map reminder” as Job and set the interval to be when you want to send email to sales representatives. And that’s it!

Sales representative will receive an email on specified time which you have set in scheduler with map and meeting details.

Urdhva Tech Pvt. Ltd. Powered by Blogger.

Urdhva Tech

My photo
SugarCRM Consultants Contact us at contact@urdhva-tech.com Skype : urdhvatech

Search This Blog

Stay connected Socially


Total Pageviews

Popular Posts