shariq
IndividualForum Replies Created
-
shariq
MemberSeptember 13, 2018 at 7:47 pm in reply to: What is a best way to start learning Salesforce? How I can start and is it better to Java?Hi,
You can start with trailhead, it is the fun way to learn salesforce.
Hope this helps.
-
shariq
MemberSeptember 13, 2018 at 7:45 pm in reply to: This error has sowing when i am try to convert lead into opportinutyHi,
Its because when you convert a lead to its account, contact, and opportunity the system checks for the mandatory fields (order of execution ), so by default it'll throw an error as a standard process.
Hope this helps
-
shariq
MemberSeptember 13, 2018 at 3:08 pm in reply to: In salesforce, can we convert Look up field into Master detail? If Yes Then How?Hi,
You can convert a master-detail relationship to a lookup relationship as long as no roll-up summary fields exist on the master object.
You can convert a lookup relationship to a master-detail relationship, but only if the lookup field in all records contains a value.
Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 3:06 pm in reply to: What are external objects? what are the uses of external objects in salesforce?Hi,
xternal objects are supported in API version 32.0 and later. External objects are similar to custom objects, but external object record data is stored outside your Salesforce organization. For example, perhaps you have data that’s stored on premises in an enterprise resource planning (ERP) system. Instead of copying the data into your org, you can use external objects to access the data in real time via web service callouts.
External objects are available with Salesforce Connect and Files Connect. Each external object is associated with an external data source definition in your Salesforce organization.An external data source specifies how to access an external system. Salesforce Connect uses external data sources to access data that's stored outside your Salesforce organization. Files Connect uses external data sources to access third-party content systems. External data sources have associated external objects, which your users and the Lightning Platform use to interact with the external data and content.
By accessing record data on demand, external objects always reflect the current state of the external data. You don't have to manage a copy of that data in Salesforce, so you're not wasting storage and resources keeping data in sync.
External objects are best used when you have a large amount of data that you can’t or don’t want to store in your Salesforce organization, and you need to use only a small amount of data at any one time.
-
shariq
MemberSeptember 13, 2018 at 3:05 pm in reply to: What is the Difference between database.query() and database.getQueryLocator() in Salesforce?Hi,
1. Database.query() retrives 50K records where as Database.getQueryLocator() retrives 50 million records from Database.
2. Database.query() is used to construct dynamic query instead of using SOQL query where as Database.getQueryLocator() is the return type of start method of a Batch class.Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 3:04 pm in reply to: Difference between database.query() and database.getQueryLocator() in Salesforce?Hi,
1. Database.query() retrives 50K records where as Database.getQueryLocator() retrives 50 million records from Database.
2. Database.query() is used to construct dynamic query instead of using SOQL query where as Database.getQueryLocator() is the return type of start method of a Batch class.Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 3:02 pm in reply to: How to ensure FLS while working with Lightning Component?Hi,
FLS stands for field level security. FLS can be ensure by adding permission checks before performing DML.
Suppose we are performing DML on account object and we want to ensure FLS for name field then :For an upsert DML
Account acc = new Account();if(Schema.sObjectType.account.fields.name.isCreateable() && Schema.sObjectType.account.fields.name.isUpdateable()){
acc.name = ‘Test’;
}here it checks weather user has permission to update and create name field or not. this is how it is ensuring the FLS. similarly we can add checks for some other DML’s.
Hope this helps!
- This reply was modified 6 years, 3 months ago by shariq.
-
shariq
MemberSeptember 13, 2018 at 3:01 pm in reply to: Give an example of a standard object that’s also junction object.Hi,
Pricebook entry is an object in the salesforce which is standard object and junction object to :
For getting information about Pricebook entry go to the schema builder by typing it in quick search box in the setup:
where you filter the objects by typing pricebookentry in search box and you will get information about junction object pricebook entry
Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 2:56 pm in reply to: When do you use a before vs. after trigger?Hi,
Before triggers are used to update or validate record values before they’re saved to the database.
After triggers are used to access field values that are set by the system (such as a record's Id or LastModifiedDatefield), and to affect changes in other records, such as logging into an audit table or firing asynchronous events with a queue. The records that fire the after trigger are read-only.Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 1:41 pm in reply to: use lightning component as Tab like custom objectHi,
force:appHostable Interface is required to implement to use lightning components as tab.
Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 1:38 pm in reply to: What are the differences between 15 and 18 digit record IDs?Hi,
One thing to note is that Salesforce IDs are case sensitive when they are 15 digit and insensitive when they are 18 digit. This means you must take into account upper and lower cases when you export the data from the system for the case sensitive data elements. If your using tools like vlookup in Excel to do comparison from various sources of data, be careful as Excel can incorrectly map the data since it is not case sensitive on the 15 digit id.
The last three digits in the ID is a checksum. A calculation to assure that the first 15 pieces of the ID are accurate for the object its being written into.
So following that analogy just mentioned.
15 digit case-sensitive version
15 digit ID is what will be received from within the user interface
18 digit case-insensitive and best used for manipulating data outside Salesforce
18 digit id is referenced through in the API and other 3rd party tools.
Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 1:36 pm in reply to: How To Create Collapsible Section And Accordion In Salesforce Lightning Component?Hi,
Below is a snippet of code for Salesforce Lightning Component to create Accordion :
<aura:component controller=”AccordionDemo” implements=”force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction” access=”global” >
<!–on component load call doInit javaScript function and fetch records from server–>
<aura:handler name=”init” value=”{!this}” action=”{!c.doInit}”/>
<aura:attribute name=”listOfAccounts” type=”Account[]”/> <div class=”slds-m-around_x-large”>
<lightning:accordion >
<!– Iterating through the list of account in lightning:accordion component –>
<aura:iteration items=”{!v.listOfAccounts}” var=”acc”>
<!–Showing each account as accordion section–>
<lightning:accordionSection name=”{!acc.name}” label=”{!acc.Name}”>
<aura:set attribute=”body”>
<p><b>AccountNumber</b> : {!acc.AccountNumber}
</p> <p><b>AnnualRevenue</b> : {!acc.AnnualRevenue}
</p> <p><b>Description</b> : {!acc.Description}</p>
<p><b>Phone</b> : {!acc.Phone}</p>
<p><b>Website</b> : {!acc.Website}</p>
</aura:set> </lightning:accordionSection>
</aura:iteration>
</lightning:accordion>
</div>
</aura:component>
Below is the snippet of Salesforce JavaScript Controller :
({
doInit: function(component,event,helper){
var action = component.get('c.getAccounts');
action.setCallback(this, function(response){
var state = response.getState();
if(state === 'SUCCESS' && component.isValid()) {
//getting the list of accounts
component.set('v.listOfAccounts', response.getReturnValue());
}
else{
alert('ERROR...');
}
});
$A.enqueueAction(action); }})
Below is the snippet of code forSalesforce Apex controller :
public class AccordionDemo {
@AuraEnabled
public static List<account> getAccounts(){
List<account> listOfAccounts = new List<account>();
for(Account acc : [SELECT Id, Name, AccountNumber, AnnualRevenue, Description, Phone, Website From Account LIMIT 50])
{
listOfAccounts.add(acc);
}
return listOfAccounts;
}
}
Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 1:33 pm in reply to: Difference between using Datatable vs. Pageblocktable tags?Hi,
PageBlock: For default salesforce standard format.
dataTable:To design customformats
Thanks
-
shariq
MemberSeptember 13, 2018 at 1:32 pm in reply to: Accessing Visualforce Components values into a JavascriptHi,
Using Component global variable, we can access visualforce components in javascript. Let us suppose, we want to use id of an apex field with id=”afield”. So, we can use the {!$Component.afield} syntax to use properties of the field in javascript.
Thanks
-
Hi,
Canvas enables you to easily integrate a third-party application in Salesforce.Canvas is a set of tools and JavaScript APIs that you can use to expose anapplication as a canvas app. This means you can take your new or existing applications and make them available to your users as part of their Salesforceexperience.
Create the Canvas App
In this step, you’ll create the canvas app in your Salesforce organization. You’ll need user permissions “Customize Application” and “Modify All Data” to create a canvas app.
In Salesforce, from Setup, enter Apps in the Quick Find box, then select Apps.
In the Connected Apps related list, click New.
In the Connected App Name field, enter Hello World.
Accept the default API Name of Hello_World. This is the internal name of the canvas app and can’t be changed after you save it.
In the Contact Email field, enter your email address.
In the Logo Image URL field, enter https://localhost:8443/images/salesforce.png. This is the default Salesforce “No Software” image. This image appears on the installation screen and on the detail screen for the app.
In the Icon URL field, enter https://localhost:8443/examples/hello-world/logo.png. This is the default Salesforce “No Software” image.This is the image that appears next to the app name in the user interface. If you leave this field blank, a default cloud image appears next to the app name.
In the API (Enable OAuth Settings) section, select the Enable OAuth Settings field.
In the Callback URL field, enter https://localhost:8443/sdk/callback.html.
In the Selected OAuth Scopes field, select Access your basic information.
In the Canvas App Settings section, select Canvas.
In the Canvas App URL field, enter https://localhost:8443/examples/hello-world/index.jsp.
In the Access Method field, select Signed Request (Post).
In the Locations field, select Chatter Tab.
Click Save. After the canvas app is saved, the detail page appears.
On the detail page for the canvas app, next to the Consumer Secret field, click the link Click to reveal. The consumer secret is used in the app to authenticate.
Select the consumer secret value and enter CTRL+C to copy it.
Go to the command window and stop the Jetty Web server by entering CTRL+C. At the prompt, enter Y.
Create an environment variable named CANVAS_CONSUMER_SECRET and set that value to the consumer secret you just copied.Hope this helps!
-
Hi,
Force.com Sites enables developers to build and deploy public web sites and web applications using Force.com. These Web sites can be assigned custom domain names, letting you run your own web sites on the platform.
Force.com Sites are built with Visualforce, and they can leverage the data, content and logic that resides in your own environment.
Thanks
-
shariq
MemberSeptember 13, 2018 at 8:33 am in reply to: How to get parent Salesforce lightning component's attribute in child component?Hi,
Component communication can be done in two ways :
Using Attributes or Methods to transfer data from parent to child component.
Using Events for Data Transfer from child to parent component.Snippet of code for passing parent attribute value to child attribute :
<aura:component access="global"/>
<aura:attribute name="parentAttribute" type="String" default='test'/>
<c:ChildComponent childAttribute="{!v.parentAttribute}"/> //here 'ChildAttribute' is an attribute in child component.
</aura:component>
Hope this helps!
-
Hi,
An external ID is a custom field that has the “External ID” attribute, meaning that it contains unique record identifiers from a system outside of Salesforce. When you select this option, the import wizard will detect existing records in Salesforce that have the same external ID.
The External ID field allows you to store unique record IDs from an external system, typically for integration purposes.
Salesforce allows you mark up to 3 fields as External IDs and these fields must be text, number or email field types. Values in these External ID field must also be unique and you can also determine whether or not value are case sensitive
Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 8:22 am in reply to: What are analytical snapshot in salesforce?Hi,
An Analytic Snapshot helps us to create report on historical data.
Analytic Snapshots comprises of three things:
A source Report of type Tabular or Summary
A Custom Object with fields matching the columns in the source Report
An Analytic Snapshot definition, which maps fields and schedules the snapshot runs -
Hi,
Once the feature is enabled, It cannot be disabled.
Although the feature cannot be fully disabled, you can however remove the Person Account record type from profiles. Removing access to the Person Account record type, will prevent users from creating new accounts using this record type.
Hope this helps!
-
shariq
MemberSeptember 13, 2018 at 8:01 am in reply to: What is the use of recordSetVar on Salesforce visualforce page?Hi,
RecordSetVar tag in Visualforce Page. recordSetVar attribute in Visual force page: ... The value of the attribute indicates name of the set of records passed to the page means collection records. This record set can be used in the expressions to return values for display on the page or to perform actions on set of records.
-
shariq
MemberSeptember 12, 2018 at 6:14 pm in reply to: How to solve "Registration accountId parameter value is not valid" error in Salesforce community cloud?Hi Shraddha,
By going through some sites I found this-
- You need to add the “Allow Customer Portal Self-Registration field to the layout that is tied to the user profile you are using to create this contact
- Make sure FLS is visible for this field for the user profile you are using to create this contact
- Edit your contact and set this flag
Hope this helps.
- This reply was modified 6 years, 3 months ago by shariq.
-
shariq
MemberSeptember 12, 2018 at 6:09 pm in reply to: How to conditionally hide field in Salesforce?Hi Ravi,
You need to overwrite the standard detail page with custom visualforce page, where you can show/hide the field on custom logic in script.
Hope this helps.
-
shariq
MemberSeptember 12, 2018 at 6:02 pm in reply to: How to refrain a child record from deleting once added to a master-detail relationship?Hi Avinish,
I think you don't want to replace the master detail field value once added at the time of insert.
You can write validation rule on it, for example - ISCHANGED(masterDetailField__c).
This will give an validation error when the field value is updated to different from the first one.
Well you can also do it at the time of creating field, just deselect the Allow Reparenting(Reparentable Master Detail) checkbox.
Hope this helps.
-
shariq
MemberSeptember 12, 2018 at 5:28 pm in reply to: While making an async call from the Visualforce controller, how can one link the page again?Hi Avinish,
By understanding your question, you want to perform asynchronous action through button or link etc that will reflect on the Visualforce page.
Suppose you are executing batch on Command button and setting variable to some value and reflecting that variable on page, there are two possible ways which I am thinking now to do it :-
- You can create a section(div or output panel) in which you want reflect the value and rerender it on a button click every time until it reflects on the page or you can write a script to rerender it after every few seconds and stops when the action(variable is shown) is done.
- Second approach is to save the values in database and query it on page. At first time when page loads the records list will empty but after batch runs the records(values) will be created, then after refreshing the page will show that inserted list. You can design a logic for filtering the records(created today or yesterday etc).
Hope this helps.