AnsweredAssumed Answered

Ajax call problem for saving record from modal dialogue box.

Question asked by sugarcrmwork on Apr 30, 2014
Latest reply on Aug 5, 2014 by Gaelle Fernandez
Hello All,

I am doing customization in SugarCRM 7.1.5. I have requirement in which I have to open up dialogue box from subpanel. After filling up the values in model box, I want to save those values via ajax call. On save click button, I call ajax call as follows.

$.ajax({
                url:"index.php?module=TestModule&entryPoint=createContact&to_pdf=true&sugar_body_only=true",
                type: "POST",
                data: {"first_name":first_name,"last_name":first_name},
                dataType: "json",
                success: function(returnData) {
                        
                    },
                error: function(returnData) {
                    
                }
            });


While saving I checked in firebug and I see two ajax call


(1) site_url/index.php?module=TestModule&entryPoint=createContact&to_pdf=true&sugar_body_only=true
(2) site_url/index.php?action=Login&module=Users&login_module=TestModule&login_entryPoint=createContact&login_to_pdf=true&login_sugar_body_only=true&login_first_name=testfname&login_last_name=testlname

It seems Sugar is going to login.

My ajax call is never successfully completed. Anyone has this issue while using ajax call ?

Outcomes