Sugar7.x Tips and Tricks

Hi all,

I have added a new page to my blog.

In this page you can expect daily tips on Sugar7.x. It will be very short but may help you a lot while customizing Sugar.

Today’s Tip

Have you ever tried making an api call from your javascript controller in sugar. How do you create your api url? Ever used app.api.buildURL() ? Any idea what are the parameters this method accepts? Don’t worry. Try it out when you write your next api call.

Use app.api.buildURL() to build url for your api calls. The method comes with four parameters as below.

app.api.buildURL(m,e,r,p);

m – Module name.

e – End point name.

r – Object containing current record data. Eg: pass your current record id  as {id:<current-recrod-id>}

p – Other parameters. Eg: limit of records,orderBy etc.

 

Follow my blog to get  daily tips……:)