« Our button to add or … | Home | MBS FileMaker Plugin,… »

Register Script for MBS Plugin

Did you know that we two functions to register: Register and StoreRegistration. You know the difference is whether you register until FileMaker quits or permanently. For most users, StoreRegistration is now the better choice. The license key is written to the preferences file and the plugin is registered when launched.

Your license script may look like this for a seats license:

# Register MBS Plugin:
If [ MBS("IsRegistered") ≠ 1 ]
  Set Variable [ $r ; Value: MBS("StoreRegistration"; "Your Name"; "Complete"; "5 Seats"; 202212; "...") ]
  If [$r ≠ "OK"]
    Show Custom Dialog ["Problem with MBS Plugin Registration"; $r]
  End If
End If

With checking using IsRegistered function, we avoid to register again and again on each startup, which just wastes CPU time. And by using StoreRegistration, the license key is stored permanently, so this script doesn't need to run again until the old license key expired. When it expired and a new plugin doesn't accept it, the stored key gets deleted on startup silently and the script can install a new key. For server, you can do the same, but please don't use a custom dialog, but something like sending email to yourself.

# Register MBS Plugin:
If [ MBS("IsRegistered") ≠ 1 ]
  Set Variable [ $r ; Value: MBS("StoreRegistration"; "Your Name"; "Complete"; "Server"; 202211; "...") ]
  If [$r ≠ "OK"]
    Send Mail [ Send via SMTP Server ; No dialog ; To: "admin@mycompany.com" ; Subject: "MBS License Problem" ; Message: $r ]
  End If
End If


And you can combine this to pick the right license key depending on target:

# Register MBS Plugin:
If [ MBS("IsRegistered") ≠ 1 ]
  If [ MBS("IsServer") ]
    # FileMaker Server:
    Set Variable [ $r; Value: MBS("Register"; "Your Name"; "Complete"; "Server"; 202211; "...") ]
    If [$r ≠ "OK"]
      Send Mail [ Send via SMTP Server ; No dialog ; To: "admin@mycompany.com" ; Subject: "MBS License Problem" ; Message: $r ]
    End If
  Else
    # FileMaker Pro:
    Set Variable [ $r; Value: MBS("Register"; "Your Name"; "Complete"; "5 Seats"; 202211; "...") ]
    If [$r ≠ "OK"]
      Show Custom Dialog ["Problem with MBS Plugin Registration"; $r]
    End If
  End If
End If

Please do not hesitate to contact us with your questions. Claris FileMaker Plugin
13 01 22 - 16:03

Start Chat