Multiple API Calls

Hey guys,

here is the thing I am dealing with… And I would really need some advice on this.

Lets say I have like 15 ajax api calls [color=#bb0000]on a button click.[/color]

First call creates a Project, other calls create a Project Tasks and even more calls create a relationship between them.

If a user is too quick and presses the button too quickly (before the previous calls actually write in suitecrm) - what will happen? I noticed when I make these calls its pretty quick but it takes like 10 seconds till it all creates a proper tasks in suitecrm.

What happens if during those 10 seconds a user presses the button again? Will suitecrm just process it or will it do something wrong?

Hope it makes sense… :lol:

You can use a flag variable to achieve this. or try using ajax with async.

Ajax Hits are limited per browsers like chrome takes 6 hits, rest hits browser queue up.

The suite automatically detects “Duplicate” basis upon few fields, you may restrict on that behalf.

Rest if any request went to the server and any duplicate check is not enabled,it will do its job. All you need to try yourself, That’s all I can say.

1 Like

Ahhh… Thanks Ashish :slight_smile:

Btw - your backup & restore now works 100% :wink:

1 Like

did you purchased?

Ah yeah sry… I am Jan from medipharmavision.cz :wink:

1 Like