This is an old revision of the document!


Create Button

You can simply create your own button to create a new Card. You could use this buttons for example on a starting page.

First, add the necessary code. To do this, add a new Client Side Script Library. Add the following code inside the newly created Script Library below the var csl_key:

function guid() {
  function s4() {
    return Math.floor((1 + Math.random()) * 0x10000)
      .toString(16)
      .substring(1);
  }
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
    s4() + '-' + s4() + s4() + s4();
} 

This code-snippet creates a new Card-Id. Next you need to add the code to actually create your Card. For this, you need the key of the proto (see Proto). Now you can add the following code snippet below the last one, replacing “my_proto_key” with the key of your Proto.

function create_product(){
    window.open("/"+$APP_URL_NAME+"/" + guid() + "?action=open_new_card&proto_key=my_proto_key", "_self");
}

create a new trigger. Next, add a button to the Proto you like. I choose my starting page to add a button.

Print/export