Troubleshooting
This page helps an administrator find out why something in Centerpoint for Salesforce does not work. Start with the logs, then look for your symptom in the table.
Logs
Switch the logs on before you try again, so the next attempt leaves a trace.
Callout Log
The callout log records every call from Salesforce to Doc Gen and the answer it got.
- In Setup, open Custom Settings, then Metaforce Customer Environment, and open Manage.
- In the record
SelectedEnvironment, tick Callout Log Enabled. Make sure Callout Timeout (ms) has a value, because the log stays off when it is empty. - Tick Callout Log Include Headers if you also want the HTTP headers of each call. Headers can hold sensitive values, so switch this off again when you are done.
- Repeat the action that fails, then open the Callout Logs tab.
Each row shows the Method, Url, Action, Status, Status Code, Duration and Result, and the Request Body and Response Body. Long bodies are cut at about 131,000 characters. The Result is OK for a successful call and the error text for a failed one.
Switch the log off when you have found the cause. It stores a record for every call.
Error Log
- In Metaforce Error Configuration, tick Error Logging Enabled. The log then keeps the full detail of every error, whatever the user saw.
- Tick DeveloperLevel for yourself, or your profile, to see the technical message in the page too. Normal users should not have it.
- Open the Metaforce Error Logs tab. A row has the Action, Error Message, Short Message, Record Id, SObject Name and User.
Symptoms and fixes
| What you see | Likely cause | What to do |
|---|---|---|
| MISSING SITE | No public site named webhook | Create the site, see Install and connect. |
| The Log in pop-up shows an error page | The sign-in could not finish | Read the error text on the page. In the Callout Log, check the sign-in call. Check the Token Endpoint Path, Authorize Endpoint Path and the named credentials, and that the site is active. |
| Client Id and Client Secret not set up. Please contact System Administrator | Nobody has logged in yet from this org | Click Log in on the Metaforce Application tab. |
| No templates in Select Template | A template is hidden by its keywords | Check USERSELECTABLE, SOBJECT, FIELDVALUES and CLASSIFICATION on the template. Tick Show all templates to test. See Configuration. |
| A template change in Centerpoint does not show | The template list is cached | Lower Template Cache Reload Interval Seconds, or empty Template Reloaded Time, in Metaforce Template Cache Ctrl. |
| No receivers are defined on this record. A receiver is mandatory to be able to create a document. | The record has no receiver | Check Identifying Field for the object, see Configuration. |
| The Smartforms card is empty | The form has no SOBJECT tag for this object, you may not use it, or the sign-in to Centerpoint failed | Tick Show all Smartforms. Check the SOBJECT tag on the Smartform in Studio: one object, with its exact API name. Check that your Centerpoint user has access to the form. Look for a failed sign-in call in the Callout Log, and click Log in on the Metaforce Application tab again if needed. |
| A Smartform stays in Smartforms In Process | The webhook does not reach Salesforce | Check the site, and that the form was sent from this org. Salesforce ignores a webhook with another org id. |
| Document was created, but saving to Salesforce Files failed | The document exists, the file could not be saved | See Metaforce Generated PDF. The document is in the archive. |
| Du har inte tillåtelse att göra massutskick | Bulk send is off for the user | Tick Allowed in Metaforce Bulk Send, see Batch sending. |
A Production environment works against Development | You are in a Salesforce sandbox | This is by design. See Configuration. |
Error messages
Messages that users see come from custom labels, so they follow the user’s language. They describe what failed, for example:
- The creation of the document was unsuccessful.
- Creating web editor session was unsuccessful.
- Searching for document(s) in the archive was unsuccessful.
- There was a timeout when calling Metaforce server.
- Sorry for the inconvenience! Required data defined by template is missing
The last message means the template needs a value that the data template does not supply. Compare the template with its data template.
The package comes with English and Swedish texts. To change a text or add a language, use the Salesforce Translation Workbench and the Custom Labels in Setup. The label names start with MET_ for letters and SMF_ for Smartforms.
Admin tabs
The Metaforce Demo app holds the tabs that administrators use to follow the work of the package. Add them to your own app if you do not use the demo app.
| Tab | What it holds |
|---|---|
| PrintOrders and Batch Logs | The batch sending job, see Batch sending |
| Callout Logs | Every call to Doc Gen, when the callout log is on |
| Metaforce Error Logs | Errors, when error logging is on |
| WebEditorDxml | The editor sessions |
| Metaforce User Authorization | Authorization records for users |
| Smart Forms Webhooks | The record of each Smartform that was sent |
| Smartform Templates | The Smartforms that Salesforce remembers from Centerpoint |
| Metaforce Templates | The cached list of letter templates |