Wednesday, August 30, 2017

Salesforce - Get your Bug Fixed!

Error:
There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "You must have My Domain deployed to use component c:PropertyListDaysOnMarketChart.".
i got this error while install the app to salesforce,, looking for the help..

This is the error screen 



https://success.salesforce.com/img/s.gif
Best Answer: 



Where are you trying to install this package? DreamHouse app is having lightning component and while using lightning component you should enable my domain first. Take a look here Enable My Domain


Sunday, August 27, 2017

Salesforce Developer Beginner - Platform Development Basics

Salesforce platform lets you develop custom data models and applications for desktop and mobile. And with the platform behind your development, you can build robust systems at a rapid pace.
And then there’s the Heroku platform. Heroku gives developers the power to build highly scalable web apps and back-end services using Python, Ruby, Go, and more. It also provides database tools to sync seamlessly with data from Salesforce.
And then there’s the host of Salesforce APIs. These let developers integrate and connect all their enterprise data, networks, and identity information.
And then there’s the Mobile SDK. The Mobile SDK is a suite of technologies that lets you build native, HTML5, and hybrid apps that have the same reliability and security as Salesforce1.
Three important terms: objects, fields, and records.
When you look at data in Salesforce, you might think that you're looking at a user interface sitting on top of a run-of-the-mill relational database. But what you’re actually looking at is an abstraction of the database that’s driven by the platform’s metadata-aware architecture.
In this abstraction, objects are our database tables. The fields on those objects are columns, and records are rows in the database. This analogy is true both for standard objects that come with Salesforce by default and custom objects that you build yourself.
Metadata forms the structure of your org. Whether you’re defining fields, business processes, or something more complex, metadata holds your configuration. The platform then renders your app’s metadata in the user interface along with its associated data.
This metadata-driven development model is one of the key differences between developing on the platform and developing outside of Salesforce. Because the platform is metadata-aware, it can auto-generate a significant part of your user experience for you. Things like dialogs, record lists, detail views, and forms that you’d normally have to develop by yourself come for free. You even get all the functionality to create, read, update, and delete (affectionately referred to as CRUD) custom object records in the database.
All this prebuilt functionality frees up your development time to work on more sophisticated custom features. Let’s take a look at how the metadata-driven development approach works in action.
The DreamHouse app is an example of what’s typically referred to as an internal employee productivity app. It’s built using various parts of the Salesforce platform. This diagram gives an overview of the system landscape of the DreamHouse application set. It includes Heroku services and other connected devices, but let’s focus on the core platform piece for the time being.
For DreamHouse, we’ve created three custom objects that support the app’s core functionality.
  • Brokers: information about partner brokers
  • Properties: photos and information about properties that are on the market
  • Favorites: properties customers have favorited
Let’s take a look at what the DreamHouse data model actually looks like. The platform provides a handy tool called Schema Builder so you can see your entity relationship model in action.
Salesforce offers a host of tools for point-and-click—or declarative—development. Most of these tools require little to no understanding of development principles: no code. Some development tasks, like writing validation rules or hooking up components with UI elements, are considered low code. That means they require some basic programmatic knowledge to complete, but aren’t so rigorous that they’re considered programmatic. For example, if you know something about logic, conditions, and CRUD operations, you can do more with Process Builder.
There are three core technologies to learn about as a Salesforce developer.
  • Lightning Component Framework: A UI development framework similar to AngularJS or React.
  • Apex: Salesforce’s proprietary programming language with Java-like syntax.
  • Visualforce: A markup language that lets you customize Salesforce pages with a powerful combination of Apex and JavaScript.
The Lightning Component framework is a user interface development framework for desktop and mobile. As its name suggests, it’s a component-based approach to UI development. Using prebuilt and custom Lightning components, you can quickly develop sleek and consistent UIs for your apps.
If you’re familiar with frameworks like AngularJS, React, or Polymer, you have a good idea of what to expect with Lightning components. The benefit, of course, is that Lightning components are ready to go with all your business data in Salesforce.
The Developer Console is the Salesforce integrated development environment (IDE) that you can use to develop, debug, and test code in your org.
Lightning Components XML markup contains both Lightning-specific and static HTML tags. It uses a <namespace:tagName>convention for its tags, which each represent a smaller, or child, component.
On the right side of the Developer Console, you also see some additional assets that are part of this component’s bundle. If you click on CONTROLLER, for example, you see some JavaScript. Lightning components use client-side JavaScript controllers and server-side Apex controllers. You can create and access those controllers, as well as other assets like component stylesheets, from the bundle menu.
Another great thing about Lightning components is that they’re mobile-ready. When you create apps for Salesforce1 mobile, you don’t have to worry about the way Lightning components display. You can just add them to the app and let the platform handle the rest.
Earlier, we talked about Process Builder as a low-code tool. While it’s low-code, you can also extend the functionality of Process Builder by writing a little code. Of course, extending Process Builder is only one of many ways you can use Apex to enhance your org’s functionality. 
Visualforce lets you create and customize pages in Salesforce as well as integrate with other standard web technologies, including HTML, CSS, and JavaScript.
The difference between Lightning components and Visualforce pages. The primary difference is right in the name. With Lightning components, you’re developing components that can be pieced together to create pages. With Visualforce, you’re developing entire pages at once. While Lightning components are newer and better for things like mobile development, there are several situations where it can make more sense to use Visualforce. Take a look at the table in User Interface Development Considerations for more details on when to use which.
Visualforce contains Visualforce markup, HTML markup, CSS, and JavaScript etc. The acronym SLDS may appear a few times. SLDS (Salesforce Lightning Design System) lets you style your pages so they match the look and feel of Salesforce’s new interface, Lightning Experience. Another thing to notice is that Visualforce uses a similar convention to Lightning components with <apex:tagName>. Before, we mentioned that Lightning components use JavaScript on the client-side and Apex on the server-side. Visualforce pages, on the other hand, use client-side Apex controllers and use JavaScript from static resources. As you continue to explore Visualforce, you’ll get very familiar with Apex controllres.
You can also access and preview Visualforce pages by searching Visualforce Pages from the Quick Find bar in Setup.
Declarative development in Salesforce is done using tools like Lightning App Builder and Process Builder. These tools require very little interaction with Salesforce’s underlying APIs.
As you move toward more programmatic development, you find a robust set of APIs that let you access your Salesforce data in a variety of ways. You already saw the API in action when we looked at Lightning components, Apex, and Visualforce.
Property__c property = [SELECT Name, Price__c from Property__c WHERE Id=:propId];
Put simply, every object in your org has an API name that lets you access data for that object. Let’s look at the SOQL query from the last unit again:
The __c denotes that the object is a custom object or field. This query is using the automatically created API access point for the Property object to retrieve information about properties in your org.
Here’s a brief look the APIs Salesforce provides and what they’re used for.


API
What you can do with it
SOAP API
Integrate your org’s data with other applications using standard SOAP protocols.
REST API
Access objects in your org using standard REST protocols.
Metadata API
Manage customizations in your org and build tools that manage your metadata model.
Tooling API
Build custom development tools for platform applications.
Marketing Cloud API
Expose Marketing Cloud capabilities with the REST API and get comprehensive access to most email functionality with the SOAP API.
Bulk API
Load, delete, and perform asynchronous queries on large data sets.
Streaming API
Send and receive notifications securely and efficiently. Notifications can reflect data changes in your org, or custom events.
Chatter REST API
Build UI for Chatter, Communities, Recommendations, Files, Topics, and more.
Mobile SDK
While it’s technically a software development kit, it’s worth including here. Integrate Native or Hybrid mobile apps directly with Salesforce.
While APIs can be used both within Salesforce and with your external systems, Heroku is all about interacting with the outside world. Heroku is a web development platform that lets you quickly build, deploy, and scale web apps.
One of the great things about Heroku is that you have a lot of flexibility in how you write your app. If you’re a Java nerd, you can write your app in Java. If you’re a diehard Python fan, Heroku won’t get in your way. PHP your jam? PHP to your heart’s content!
Heroku is built on Amazon Web Services (AWS), meaning a lot of infrastructure concerns you might have in standard web app development are taken care of for you. On top of that, Heroku Connect unifies your Salesforce data with your Heroku Postgres data so you don’t have to manage moving information across platforms. No worrying about infrastructure or data storage means more time for you to focus on new development..
The topics we’ve covered up to now are more or less the “essentials” of our development environment. But there are many other opportunities for you to flex your development skills and have some fun with the platform.

IoT

Depending on your industry, integrating Salesforce with the Internet of Things (IoT) may or may not be a necessity. However, with smart devices on the rise, it’s not a bad idea to get familiar with developing with IoT in mind.
For example, when DreamHouse real estate agents prepare to show a house to a potential buyer, there are things they always do, such as unlock the doors to the house, turn on the lights, and make sure the temperature is just right.
What if real estate agents could make these preparations on-the-go from their Salesforce1 mobile app? By connecting smart devices with Salesforce, they can do exactly that. Using a combination of Visualforce or Lightning components, microservices hosted on Heroku, and the IoT interfaces from smart locks, lights, and thermostats, you can build IoT control right on the platform.
Of course, IoT has many other applications. For any company with a connected hardware component, Salesforce’s IoT capabilities, including the comprehensive IoT cloud, give you an easy way to collect, manage, and analyze data about devices. It also helps you do things like monitor the performance status of your customers’ devices and define business logic that supports customer engagement.

Bots

Chatbots are typically used in external customer service. But you can also build them right into your Salesforce org to help your employees navigate their data.
Let’s think about DreamHouse again. Say a family gets in touch with a real estate agent and tells her they want to purchase a three bedroom home in the Boston area. To find appropriate homes for this family, the real estate agent can take advantage of bots. Back in our DreamHouse org, we can see a bot in action.
From the AppLauncher, select DreamHouse. At the bottom of the page, there’s a DreamBot item. Click it, type 3 bedrooms in Boston, and press enter.
Pretty cool! The bot turned up all the properties from DreamHouse’s listings that match the criteria you entered.
DreamBot is coded entirely in Apex. If you want to take a closer look at how it’s done, open your Developer Console and go to File | Open | Classes | HandlerFindProperties.apxc. You can also code bots that connect to services like Slack, Facebook Messenger, and Amazon Alexa.
You can use Apex and the Einstein Vision API to create custom image recognition and classification engines. For the cat lovers out there, check out the Build a Cat Rescue App That Recognizes Cat Breeds Trailhead project. And if you don’t like cats, don’t worry. Einstein Vision can work for you, too. This blog post uses the Einstein Vision API in combination with Raspberry Pi to detect and deter cat invaders.
For the data-savvy, you can Create a Custom Map for Analytics Charts using Einstein Analytics, GeoJSON, and Python.
Or, you could use platform events and Lightning components to Build an Instant Notification App.

Lightning Inter-Component Communication Patterns

Lightning Inter-Component Communication Patterns If you’re comfortable with how a Lightning Component works and want to build producti...