Tuesday, 5 October 2010

Creating Custom Applications


Get stoked….we are finally going to create a custom application. Not the most exciting or unique thing about learning how to become a Salesforce developer but again very necessary. Creating Apps is great due to the fact they are simple and involve almost no code.

I previously mentioned that we would be creating a basic invoice-payment management system. This is an application a large number of business’s use to invoice for a specific amount that is be paid over a designated period of time. On the Custom Apps page, click "New." Type in "Scheduled Payment Manager" for the Label and what you think is best for the description. The label is the name of your application and will show up in the drop-down list in the upper-right corner of the screen. Click "Next" and you'll be prompted to choose an image for your application. The image you choose will show up in the upper-left corner of the screen. Click "Next" to continue.

You will pass by the ‘Custom Tabs’ options at this point since we have yet to create these tabs yet. We will get to that soon in this post. At this point you need to decide which end users will be granted access to the application. Personally I think you should show it to everyone who uses the platform, but I like to show off. After you hit “Save” you should see "Scheduled Payment Manager" in the list of custom applications.

This is a simple App that only requires two objects, Scheduled Invoice and Scheduled Payment. Scheduled Invoice is the parent object with a one-to-many relationship with the Scheduled Payment object. This is referred to as the Master-Detail relationship. Because of this relationship you'll create the Scheduled Invoice object first. Click "Objects" under the "Build" menu on the left side of the screen, and then click "New Custom Object". You will then input the following data to finalize the object:

Label: Scheduled Invoice
Plural Label: Scheduled Invoices
Object Name: Scheduled_Invoice
Record Name: Scheduled Invoice ID
Data Type: Auto Number
Display Format: SP-{00000}
Starting Number: 1
Allow Reports: Checked
Allow Activities: Checked
Add Notes and Attachments: Checked
Launch New Custom Tab Wizard: Checked



After hitting “Save” you are brought to the Custom Tab definition page and the “Add to Profiles” screen. Basically the only things you really need to de here is choose the ‘Tab Style’ and decide who has access to your new tab.

The “Add to Custom Apps” screen is next and allows you to choose which applications your tab is associated with. Deselect all applications except your new custom application ("Scheduled Payment Manager") and click "Save." The platform will instantly redirect your completed custom object.

An important part of this application is adding summary fields to the parent object (Scheduled Invoice). These fields calculate values based on the parent’s child objects, which is what will we create next. The child object in this application is the Scheduled Payment. To do this you simply need to input these values in the "Custom Object Definition Edit" screen:

Label: Scheduled Payment
Plural Label: Scheduled Payments
Object Name: Scheduled_Payment
Record Name: Scheduled Payment ID
Data Type: Auto Number
Display Format: SP-{00000}
Starting Number: 1
Allow Reports: Checked
Allow Activities: Unchecked
Add Notes and Attachments: Unchecked
Launch New Custom Tab Wizard: Unchecked

You won't need a custom tab for this object since it is the ‘child’ of the Scheduled Invoice object, but you will need to add custom fields. However this is a lot of information to digest at this point so we can start there in the next post.

No comments:

Post a Comment