Sunday, 26 October 2014

Opportunity Life Cycle

portunity is a potential revenue generating event.

Opportunity Life Cycle is nothing but how an Opportunity moves from one stage to another and how it is finally closed.


How to switch to another Salesforce account in Dreamfactory Snapshot?

1. Go to View --> Switch Salesforce Account.

2. Enter the username and password and check "Snapshot" check box, it is a Sanbdox.

3. Click "Login".

How to update Eclipse?

1. Go to Help --> Check for Updates.

How to write an Apex trigger

Want to get a deeper understanding of our simple apex trigger? Look no further!
Here’s a reminder of the code we wrote in the original post:
trigger ForceForecasting on User (before insert) {
for (User userInLoop : Trigger.new) {
userInLoop.ForecastEnabled = true;
}
}
Let’s take a look at the most important line first. I gave this line a deep green background so you’d know it’s critical!
userInLoop.ForecastEnabled = true;
You can take away nothing else from this post, but just know that this is where all the magic happens. If you wanted to auto-populate the “Company” field on every new user instead, you could change this line to:
userInLoop.CompanyName = 'Google, Inc.';
…while leaving every other line of code the same and it would work!
Let’s move on to the next most important lines of code. This is our loop:
for (User userInLoop : Trigger.new) {
...
}
If this code was translated to normal talk, it would say “For every user in our trigger, do everything inside the brackets { }”. Every Salesforce trigger will always have one of these loops.
Finally, let’s talk about the boilerplate code. You can skip this if you want to save brain power.
trigger ForceForecasting on User (before insert) {
    ...
}
Every trigger in Salesforce has this boring code wrapped around it. All it does is “start” and “end” the trigger.
Glossary of Variables Used
trigger – Every trigger must begin with this!
ForceForecasting – this is the name we gave our trigger. We could’ve named it anything we wanted to!
User – This is the name of the standard sObject in Salesforce. Having this in the first line of code tells our trigger to operate on changes to this object. We can use custom objects too… Salesforce is so awesome!!!
before insert – This tells the trigger to fire before the User is inserted/created. We could’ve saidbefore update if we wanted to as well. See a full list of operations here.
userInLoop – this is the variable we created to represent each specific user in the loop as it iterates one by one across all users in Trigger.new. This variable only exists inside the brackets of the loop! We could’ve made it edit any field on the User object by adding another field API name after the period instead. It’s good manners in the programming world to write variables names in camelCase.
Trigger.new – the special Salesforce variable that is a list of every User captured in our trigger. There will always only be one User unless you’re doing a bulk insert… like through Data Loader!

How to write an Apex trigger

Let’s write a trigger that’s both simple and practical!
We’ll write a trigger on the User object – all it will do is check the “Allow Forecasting” checkbox on every newly created user. Salesforce won’t let us modify this permission in a workflow, but the joke’s on them… we can just write a trigger!
trigger ForceForecasting on User (before insert) {
for (User userInLoop : Trigger.new) {
userInLoop.ForecastEnabled = true;
}
}
I added some color to the code to help you focus on what’s important. More importantly though, the colors will show you what you can ignore… save your brain power!
  • Green highlighted lines means it’s important! The deeper the green, the more useful the code. Skim the code without any highlights, that’s just boilerplate code.
  • Blue colored text are Salesforce reserved variables or sObjects. They have useful functionality that I will teach you to master!
  • Purple colored text are variables that we define. We can name them anything we want!
For now, try to guess what each word/line does based on its color.

asp.net interview questions part- 8

An AppDomain can be thought of as a lightweight process. Multiple AppDomains can exist inside a Win32 process. The primary purpose of the AppDomain is to isolate applications from each other, and so it is particularly useful in hosting scenarios such as ASP.NET. An AppDomain can be destroyed by the host without affecting other AppDomains in the process.
Win32 processes provide isolation by having distinct memory address spaces. This is effective, but expensive. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other’s memory.
One non-obvious use of AppDomains is for unloading types. Currently the only way to unload a .NET type is to destroy the AppDomain it is loaded into. This is particularly useful if you create and destroy types on-the-fly via reflection.
Yes, .NET framework does support one-way messages. To set a void method as one-way operation, set the OneWay property to true on SoapDocumentMethodAttribute or on SoapRpcMethodAttribute attribute. In such cases, the Web service client is intending to just send some notification to the server and not expect any response. The server in such cases returns 202 Accepted HTTP response to the client. And there will be no output message in the WSDL file for such methods. The support for one-way Web service operations was also added in the latest SOAP Toolkit 3.0 release.
Yes, in addition to XDR and XSD schema validation, .NET continues to support the DTD to validate the XML documents. The System.Xml namespace contains a class named XmlValidatingReader that can be used to validate the XML documents.
It is a Text File that contains the combination of the following:
• Text
• HTML tags
• Script Commands

One of ASP.NET’s most useful features is the extensibility of the HTTP pipeline, the path that data takes between client and server. You can use them to extend your ASP.NET applications by adding pre- and post-processing to each HTTP request coming into your application. For example, if you wanted custom authentication facilities for your application, the best technique would be to intercept the request when it comes in and process the request in a custom HTTP module.






Read All Questions :-asp.net interview questions part-(1 to 8)
You have gain more knowledge

Visit Daily 

 best of luck !






asp.net interview questions part- 7

The process in which a Web page sends data back to the same page on the server.
Just call SetNoStore on the HttpCachePolicy object exposed through the Response object’s Cache property, as demonstrated here:




SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents caching of a Web page that shows the current time.
VSDISCO files are DISCO files that support dynamic discovery of Web services. If you place the following VSDISCO file in a directory on your Web server, for example, it returns   references to all ASMX and DISCO files in the host directory and any subdirectories not noted in elements:
· 
<DYNAMICDISCOVERY
xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17">





 
ControlToValidate property and Text property.
System.Web.UI.Page
The CLR computes actual permissions at runtime based on code group membership and the calling chain of the code.
Authentication happens first. You verify user’s identity based on credentials. Authorization is making sure the user only gets access to the resources he has credentials for.
A code group is a set of assemblies that share a security context.
Using System.Security.Permissions;
[assembly:FileDialogPermissionAttribute(SecurityAction.RequestMinimum, Unrestricted=true)].
You can request permission to do something and you can demand certain permissions from other apps. You can also refuse permissions so that your app is not inadvertently used to destroy some data.
Code security is the approach of using permissions and permission sets for a given code to run. The admin, for example, can disable running executables off the Internet or restrict access to corporate database to only few applications. Role-based security most of the time involves the code running with the privileges of the current user. This way the code cannot supposedly do more harm than mess up a single user account. There’s no better, or 100% thumbs-up approach, depending on the nature of deployment, both code-based and role-based security could be implemented to an extent.
Displaying a drop-down list requires a template column in the grid. Typically, the ItemTemplate contains a control such as a data-bound Label control to show the current value of a field in the record. You then add a drop-down list to the EditItemTemplate. In Visual Studio, you can add a template column in the Property builder for the grid, and then use standard template editing to remove the default TextBox control from the EditItemTemplate and drag a DropDownList control into it instead. Alternatively, you can add the template column in HTML view. After you have created the template column with the drop-down list in it, there are two tasks. The first is to populate the list. The second is to preselect the appropriate item in the list — for example, if a book’s genre is set to “fiction,” when the drop-down list displays, you often want “fiction” to be preselected.
Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.
Client side validation is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.
We can Validate the controls in an ASP.NET page by using special validation controls that are meant for this. We have Range Validator, Email Validator.
The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.
A language should comply with the Common Language Runtime standard to become a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language.
Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection.
The CLI (Common Language Infrastructure) is the definiton of the fundamentals of the .NET framework - the Common Type System (CTS), metadata, the Virtual Execution Environment (VES) and its use of intermediate language (IL), and the support of multiple programming languages via the Common Language Specification (CLS). The CLI is documented through ECMA

The CLR (Common Language Runtime) is Microsoft’s primary implementation of the CLI. Microsoft also have a shared source implementation known as ROTOR, for educational purposes, as well as the .NET Compact Framework for mobile devices. Non-Microsoft CLI implementations include Mono and DotGNU Portable.NET.

Read All Questions :-asp.net interview questions part-(1 to 8)
You have gain more knowledge

Visit Daily 

 best of luck !