Synchronously collection.insert in a Meteor.call

This code is trying to add a document to a collection by making a Meteor.call, But I need to wait for the results of ActiveTask.insert(doc); in the server code before the next line gets executed by the compiler because it runs another code which depends of the value being inserted in the collection ActiveTask.

Is this possible and how? Thanks

client.js

Template.mainMenu.events({
  'click .menuItem': function () {
    var menuShortName = this.menuShortName;
    Meteor.call('addAction', {'action': menuShortName});

server.js

Meteor.methods({
    addAction: function (doc) {
        ActiveTask.remove({});
        doc.createdAt = new Date();
        ActiveTask.insert(doc);
    }
});

What is that next line? When we know what you want to achieve, we can suggest the optimal way to do it.

But in most cases, good enough way is to use Meteor.call’s callback to grab the result from the Method and put the code you wanted to execute later into the callback. The alternative is to keep it outside of the callback, but execute it when a particular flag from the callback is set.