How retrieve record by custom code in record.js?

How use App.api.call in record.js to retrive record by custom field?

Parents
  • Hello Rodolfo,

    You need to create your custom end-point API for that please check below support link.

    http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/API/Web_Services/Extending_Web_Servi…

    Below is the API call you need to call through record.js file.

    var param = {
                id: "123456789"
            };
            var url = app.api.buildURL("<module_name>", "function_name", {}, param);
            app.api.call('GET', url, {}, {
                success: function (data) {
                    if (data == "Success")
                    {
                        //success
                    }    
                },
            });
    

    Hope it will help.

    -BPATEL

  • Thanks for your answer. I am still confused how to do this .

    What value function_name ?

     

    I can not use the functions of v10 REST API?

     

    Do you have an example of how to check duplicate value in a custom field ?

     

    Thank you

Reply
  • Thanks for your answer. I am still confused how to do this .

    What value function_name ?

     

    I can not use the functions of v10 REST API?

     

    Do you have an example of how to check duplicate value in a custom field ?

     

    Thank you

Children
No Data