Forum Replies Created

Page 46 of 53
  • Parul

    Member
    September 13, 2018 at 3:50 pm in reply to: How to ensure FLS while working with Lightning Component?

    Hi.

    Lightning Data Services already ensures Field Level Security and we can also use the Apex using isAccessible, isCreateable, isDeleteable, isCreateable and etc methods of Schema class.

     

    Thanks

  • Hi

    Database.QueryLocator object when you are using a simple query (SELECT) to generate the scope of objects used in the batch job. If you use a querylocator object, the governor limit for the total number of records retrieved by SOQL queries is bypassed but we can retrieve up to 10,000 records.

    Database.query():

    We can retrieve up to 50,000 records.
    If VF page has read-only attribute, use Database.getQueryLocator().
    In Batch Apex, if we use Database.query(), it supports 50,000 records only.

    String fieldName = ‘Name,Phone’;
    String dynQuery = ‘select Id ‘ + fieldName + ‘ From Account’;
    Database.query(dynQuery);

    Thanks

  • Hi

    Database.QueryLocator object when you are using a simple query (SELECT) to generate the scope of objects used in the batch job. If you use a querylocator object, the governor limit for the total number of records retrieved by SOQL queries is bypassedbut we can retreive up to 10,000 records.

    Database.query():

    We can retrieve up to 50,000 records.
    If VF page have read only attribute, use Database.getQueryLocator().
    In Batch Apex, if we use Database.query(), it supports 50,000 records only.

    String fieldName = 'Name,Phone';
    String dynQuery = 'select Id ' + fieldName + ' From Account';
    Database.query(dynQuery);

    Thanks

     

  • Hi

    To convert lookup to the master-detail relationship you need to give parent record on all child records. This is because a master-detail relationship does not allow for 'orphaned' child records. Once you have a lookup with each child having a parent than you can go back and convert the lookup field to a master-detail.

     

    Thanks

  • Parul

    Member
    September 13, 2018 at 1:47 pm in reply to: Give an example of a standard object that’s also junction object.

    Hello Avanish,

    There are many standard objects which behaves as junction object as well. Some of them are:

    • PricebookEntry behaves as junction object between Product and Pricebook.
    • Quote object behaves as junction between Contact and Opportunity.
    • Opportunity Product behaves as junction between Opportunity and Product.

    Hope this will help you.

  • Parul

    Member
    September 13, 2018 at 1:34 pm in reply to: What do {!expressions} refer to when used in Visualforce components?

    A Visualforce expression is any set of literal values, variables, sub-expressions, or operators that can be resolved to a single value. Method calls aren't allowed inexpressions. Anything inside the {! } delimiters is evaluated and dynamically replaced when the page is rendered or when the value is used.

     

    Thanks

  • Using this tag you can used with both radio buttons and picklists to create the selectable values <apex:selectOption> 

     

    Thanks

  • Parul

    Member
    September 13, 2018 at 1:27 pm in reply to: Difference between using Datatable vs. Pageblocktable tags?

    Hi

    Apex:dataTable -
    An HTML table that is defined by iterating over a set of data, displaying information about one item of data per row. The body of the < apex:dataTable > contains one or more column components that specify what information should be displayed for each item of data. The data set can include up to 1,000 items.->no need to write inside <apex:pageblock> or <apex:pageblocksection>
    -> there is no required value
    -> the data can be displayed using custom styles
    -> we need to specify column headers explicitly

    Apex:pageBlockTable – A list of data displayed as a table within either an < apex:pageBlock > or < apex:pageBlockSection > component, similar to a related list or list view in a standard Salesforce page. Like an < apex:dataTable >, an < apex:pageBlockTable > is defined by iterating over a set of data, displaying information about one item of data per row. The set of data can contain up to 1,000 items.The body of the < apex:pageBlockTable > contains one or more column components that specify what information should be displayed for each item of data, similar to a table. Unlike the < apex:dataTable > component, the default styling for < apex:pageBlockTable > matches standard Salesforce styles. Any additional styles specified with < apex:pageBlockTable > attributes are appended to the standard Salesforce styles. ->pageblocktable should be inside of <apex:pageblock> or <apex:pageblocksection>
    -><apex:pageblocktable> has a required attribute called "value"
    ->it uses the standard salesforce page styles
    ->column headers will be displayed automatically

     

    Thanks.

  • Parul

    Member
    September 13, 2018 at 11:38 am in reply to: What is a externalid in salesforce?

    Hi,

    This is a field that usually references an ID from another (external) system. For instance, if the customer has an Oracle Financials system that they will be linking with Salesforce, it may be easier for them to be able to refer to the Oracle ID of account records from within Salesforce. So they would create an external ID in Salesforce and they would load the Oracle ID into that field for each account. They can then refer to that ID field, rather than the Salesforce id.

    Additionally, if you have an external ID field, the field becomes searchable in the sidebar search. You also can use the upsert API call with the external ID to refer to records.

    You can have multiple records with the same external ID (though it is not recommended, as it will defeat the purpose of the external id)

     

    Thanks.

  • Parul

    Member
    September 13, 2018 at 10:37 am in reply to: What are analytical snapshot in salesforce?

    Salesforce Analytic Snapshots you are able to create and store snapshots of data that you want to monitor, using custom objects. Authorized users can save tabular or summary report results to fields on a custom object, then map those fields to corresponding fields on a target object. They can then schedule when to run the report to load the custom object's fields with the report's data. Analytic snapshots enable you to work with report data similarly to how you work with other records in Salesforce.

     

    Thanks.

  • Parul

    Member
    September 13, 2018 at 9:38 am in reply to: What are force.com sites?

    Hi

    Force.com Sites:

    • Force.com sites support both authenticated and public websites.
    • Included in all Enterprise Edition (or above) and Developer orgs.
    • Support for custom pages using Visualforce, JavaScript, CSS.
    • Main target audience is for users that are developers familiar with the above languages.
    • Can access all Force.com objects.

    Thanks.

  • Parul

    Member
    September 13, 2018 at 9:33 am in reply to: Relation Between OpportunityLineitem & Pricebook entry

    Hi,

    OpportunitylineItem is junction object between opportunity and pricebookentry. We need PricebookEntry Id and opportunity Id while creating OpportunityLineItems.
     

    Thanks.

  • Parul

    Member
    September 13, 2018 at 9:29 am in reply to: What is the use of recordSetVar on Salesforce visualforce page?

    Hi

    The recordSetVar attribute indicates that the page uses a list controller and the variable name of the record collection. This variable can be used to access data in the record collection.

    For example VF Page:
    <apex:page standardController="Account" recordSetVar="accounts">
    <apex:dataList var="a" value="{!accounts}" type="1">
    {!a.name}
    </apex:dataList>
    </apex:page>
    Above displays all account with number.

     

    Thanks.

  • Parul

    Member
    September 13, 2018 at 8:54 am in reply to: How to calculate the size of object?

    Hi Jayant

    Most records are 2KB, see the list below for exceptions..

    Document storage is separate from data storage and counts at the actual size of the uploaded document.

    For up to date figures on your company's use of storage please refer to:

    Setup | Data Management | Storage Usage

    Setup> Administration> Data> Storage Usage

    For Leads,Contacts,Accounts,Opportunities,Forecasts,Events,Tasks,Cases ,Case Team Member,Solutions,Notes,Custom Reports,Contracts,Google Docs,Quotes,Custom Objects,Quote Template Rich Text Data it is-- 2KB
    For Person Accounts,Articles it is- 4KB
    For Campaigns - 8KB
    For Campaign Members – 1KB
    Email Message - This is dependent upon the content of the messages, a 100kb email message takes 100kb of data storage space.  Text only emails will take less than HTML due to only being the body text and not the html code and text version as well.

    NOTE ABOUT PERSON ACCOUNTS
    Person Accounts consume a record in both the Account and Contact objects. Each record allocates 2KB, so each Person Account record will require 4KB of storage space.

    As an example, 500,000 person accounts will require around 2GB of storage.
    Storage needed = (500000 X 4KB)/1024 = 1953.125 MB which when further divided by 1024 = 1.9073 GB which is around 2GB.

    Images from Rich Text Fields are stored in file storage area.

    Thanks

  • Parul

    Member
    September 13, 2018 at 8:12 am in reply to: How to disable the Person Account?

    Hi

    If you enable the Person Account feature in any org, there are a list of implications that we ask administrators to agree upon. One of these implications is that once the feature is enabled, It CANNOT be disabled. There is only one option you can remove the person account from profile.

     

    Thanks.

  • Parul

    Member
    September 13, 2018 at 4:52 am in reply to: Why can we not perform callout in Salesforce after DML statement?

    Hi

     

    The DML operation perform a transaction it return the data after performing transaction completly so if you perform callout in the middle it may affect in the result. It's true that you cannot make callouts with pending transactions in the request context.  Also, it's not possible to do an explicit commit.  So your only way out is to make the callout in a separate context.   I understand that asynchronous call using @Future doesn't work for you.

     

    Thanks

  • Parul

    Member
    September 13, 2018 at 4:47 am in reply to: What is the difference between Insert and Database.insert in Salesforce?

    Hi

    Insert:

    • Partial insert is not supported.
    • Roll back is not supported.
    • If we use the DML statement (Insert) in bulk operation, then if error occurs the execution will stop. In that case Apex code throws an error and none of the record will insert to the database.

    Database.Insert

    • Database methods are static methods available in Database class.
    • Partial insert is supported.
    • Roll back is supported.
    • Includes the optional allorNone parameters that defaults true.
    • If we use DML database methods (Database.Insert) in bulk operation, then if error occurs the remaining records will be inserted/updated means partial DML operation will be done. The only record throwing an error will not be inserted/updated.

    Example: If we are inserting 10 records in an object, Where 5 records are correct and remaining 5 records are incorrect.

    In DML statement (Insert) all the 10 records will be failed, because if one record is incorrect or error means all other remaining records will not be inserted. It will throw error.
    In Database.insert 5 records will be inserted, remaining 5 records will be failed.(i.e. Partial DML Operation).

     

    Thanks
     

  • Hi

    Wizard controllers are able to manage multiple pages and state across each page that is not possible to manage by other simpler controllers in VisualForce. A VisualForce controller defines a complete set of instructions that specify what can happen when the user interacts with different components available on VisualForce pages.

    Thanks

  • Hi Syed,

    Salesforce has come up with a new concept - BIG OBJECT

    The best and efficient way to handle data volume in the query by Sync SOQL or Async SOQL. It can hold billions of records. Although, it has some limitations. You can not work with it like a Custom object.

    But it holds the (m+) of records.

    Hope this will help you!

    Thanks.

  • Parul

    Member
    September 13, 2018 at 4:18 am in reply to: How to conditionally hide field in Salesforce?

    Hi

    I think you can't hide fields depending on values in other fields. Most user will set up a validation rule (VR) because Salesforce doesn't support this but if you to hide you can only do this by creating custom validation.

     

    Thanks

     

  • Hi

    Once a child record has been added to master-detail relationship you have one option when you are creating the relationship deselct the checkbox of allow reparenting option.

     

    I think this may be the solution!.

     

    Thanks

  • Parul

    Member
    September 12, 2018 at 4:57 pm in reply to: What is AJAX typically used for in Salesforce Visualforce pages?

    Hello Suniti,

    AJAX Components are used to dynamically replace the content of a panel tag within a page without replacing the page in the browser window. These tags allow a more seamless, flicker-free user interface. User interactions with a page no longer need to submit/request entire pages, instead, pieces of the page can change as data is entered.
    There are few AJAX components in Salesforce, which supports AJAX functionality. They are:

    •  Action Function
    • Action Poller
    • Action Region
    • Action Status
    • Action Support

    Hope this helps.!

  • Parul

    Member
    September 12, 2018 at 4:53 pm in reply to: How to show PickList field as Radio Buttons on Visualforce Page?

    Hi Tanu,
    Try this code , Hope so it will be helpful for you..
    public List<SelectOption> getTypes(){
    Schema.sObjectType sobject_type = customObject__c.getSObjectType();

    Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe();

    Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();

    List<Schema.PicklistEntry> pick_list_values = field_map.get(‘picklistField__C’).getDescribe().getPickListValues();

    List<selectOption> options = new List<selectOption>();

    for (Schema.PicklistEntry a : pick_list_values) {
    options.add(new selectOption(a.getLabel(), a.getValue()));
    }
    return options;

    to use this on page:

    <apex:selectRadio value=”{!customObject__c.picklistField__c}”>
    <apex:selectoptions value=”{!types}”></apex:selectoptions>
    </apex:selectRadio>
    Here picklistField__c is a field name which contains picklist values..

    Thanks

  • Hi Mohit,

    No, there is no way to duplicate the pages in community.Also, you cannot ideally clone but you can always begin with a template .

    Thanks

  • Parul

    Member
    September 12, 2018 at 4:44 pm in reply to: Not sending emails to some domains from Salesforce

    Hi Jitesh,

    We can achieve this use a standard field in Salesforce. Their is a field in Salesoforce called "EmailOptOut" . If this is checked then no mass emails are sent to the record with this checkbox checked.

    We can add the blacklisted domain in the custom setting and whenever the record is created of updated we can check if it has a blacklisted domain the check off the "Email opt out" checkbox which does not allow to send any email from Salesforce for that particular record.

    Thanks

Page 46 of 53