Ajax to access Server Side info

Hi,

I have been using this Ajax method to access info from another entity:

https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2009/04/21/using-ajax-to-accessing-server-side-objects-client-side.aspx

I have now upgraded to 7.2.a.1. Will this no longer work? What method can I use now?

Thanks

Paul

  • 0

    Paul

    You should still be able to use this method. You may have to tweak it because of the way that screens are now built in Sage CRM 7.2 (there are no frames). The new clientside API also allows for Ajax calls to SData accessible objects e.g.

    //Custom Content - SData (Ajax) Request Example

    crm.ready(function()

    {

    //

    var companyID = crm.fields("oppo_primarycompanyid").value();

    var successCompany = function(crmRecord)

    {

    crm.infoMessage(crmRecord.comp_name);

    }

    }

    crm.sdata({

    entity: "company",

    id: companyID,

    success: successCompany

    });

    })