...
- Custom Objects is a stand-out feature of SalesforceCRM, since it allows store admins and developers to create unique tables with fields of their favor.
- in Magento, we have developed 3 Custom Tables: Custom Customer, Custom Products and Invoices(Since Salesforce doesn't support an Invoice table by default) and a minitable called ItemInvoice to give the admin a closer look at the products invoiced. Now what you need to do to make use of these tables is making some Custom Objects with the following steps:
Creating a Custom Object
- In Magento admin site, go to SalesforceCRM Integration –> Configuration and scroll down, you will see some options in Sync Custom Table.
- Sync Custom Customer: this sync option is on by default.
- Custom Customer Table: this is the API Name of the Custom Table in Salesforce.
- Unique field of Custom Customer Table: this is the API Name of an unique field in Custom Customer Table.
- The other 2 tables' options have the same function as above. To add a new Custom Object, go to Setup. In the Build console, expand Create and click on Objects, the Custom Objects window will popup. Click on New Custom Object to get started.
- Fill in the following fields
- Label: Name of your Custom Object
- Plural Label: Name of your Custom Object in plural form
- Object Name: This name will be auto-filled once Label is filled
- Description: Describe your Custom Object
- Record Name and Data Type: This will also be auto-filled.
- Hit Save when done, your new Custom Object is now successfully created.
Creating a Custom Field
- To add or edit custom fields, go to Setup. In the Build console, expand Create and click on Objects, the Custom Objects window will popup.
- Click on the table that you want to edit, in here we will take Custom Customer for instance, add click on New to start adding new field.
- You will see a long list of options for your new field, choose one of your need, then click on Next.
- Next, you need to fill in a few details for your new Custom Field
- Field Label: Name for your new Custom Field.
- Field Name: This will be auto-filled after you filled in Field Label.
- Description: more detail description about the field.
- Help Text: this text will appear when user hover mouse on the field's icon.
- Hit Next to continue, you will see a list of checkboxes for security purpose, leave them and move on.
- When done, hit Save. Your field is successfully created.
Configuring for Custom Tables
- Things get a bit more tricky when it comes to this part, as you have to create an unique field for each table. In here we have created a Custom Customer Table with the default API name CustomCustomerc and an unique field Emailc.
- When you are done with creating, go to Salesforce's Configuration Site in Magento and fill in the needed information.
- One small remind, you also have to create a table called InvoiceItem with the following config
- One last step, in Magento, hit SalesforceCRM Integration –> Retrieve Field, your new Custom Table and fields are ready to use
...