Forum Replies Created

Page 28 of 57
  • Hi,

    No, we can not change the settings of child record in Master Detail relationship because child record is controlled by parent record.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:43 AM in reply to: What Might Be Cause Of This Error ?

    Hi,

    1.First check that every field used in report has Field level security for external users.
    2.Check whether Standard Report Visibility settings are enabled, if it is enabled user can be able to see reports which are based on standard report types.
    3.Now external user can be able to access sensitive information of internal user.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:40 AM in reply to: Create Field In The Object With Master Detail Relationship.

    Hi,

    No. we can no create master detail relationship first create look up relationship and associate look fields for every parent record and then convert this to Master detail relationship.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:39 AM in reply to: What are Custom Reports in Salesforce?

    Hi,

    Custom reports in Salesforce are those created by a user with specific criteria. These type of report can be deleted, edited and stored in personal folders.

    The custom report is a specialized report of your transactions for a time period that you specify. For example, you can design a report that lists all transactions over a 3-day period for a particular credit card, or a report that lists only particular types of transactions (for example, declined Sales and Authorizations) for all credit cards over a 5-day period.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:39 AM in reply to: What Is Trend Report in Salesforce?

    Hi,

    Trend reports in salesforce are those which displays historical data. Trend reports are used to analyse which fields contains data that we want to leave out.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:36 AM in reply to: What Are The Different Dashboard Components in Salesforce?

    Hi,

    Salesforce dashboard components are used to represent data. Salesforce dashboards have some visual representation components like graphs, charts, gauges, tables, metrics and visualforce pages. We can use up to 20 components in single dashboard.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:35 AM in reply to: What is the use of Floating Report Header?

    Hi,

    Floating report headers enables us to display the column header visible on each page when we scroll the report page.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:33 AM in reply to: What Is A Workflow Field Update in Salesforce?

    Hi,

    Field updates in workflow and approval processes specifies the field that we want updated and inserting the new value for it. Depending on the field type, we can choose the following options. They are apply a specific value, make the value blank, or calculate a value based on a formula you create.

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:32 AM in reply to: Different Workflow Components Available In Salesforce?

    Hi,

    In salesforce.com. workflows consists of 5 components they are.

    1.Workflow rules.
    2.Workflow tasks.
    3.Workflow Email alerts.
    4.Workflow field updates.
    5.Workflow Outbound messages

    Thanks

  • shariq

    Member
    September 20, 2018 at 7:32 AM in reply to: What Are The Different Workflow Actions Available In Salesforce?

    Hi,

    1. Tasks.
    2. Email alerts.
    3. field updates.
    4. Outbound messages

    Thanks

  • Hi,

    Even after deactivating the the workflow, its action will not be removed. It’s still active in queue.

    Thanks

  • shariq

    Member
    September 19, 2018 at 11:04 PM in reply to: Picklist in formula Field?

    Hi,

    Create a formula field of text type and put this expression in it -

    Text(Sobject__c.Picklist__c)

    Hop this helps.

  • shariq

    Member
    September 19, 2018 at 11:02 PM in reply to: what is the use of Database.Stateful in Salesforce Batch Class?

    Hi,

    The only time you need Database.Stateful is when the execute method modifies a class variable in a way meant to be used across multiple execute methods or in the finish method. The majority of batches you will ever write will not need Database.Stateful. It's important to know that using Database.Stateful will harm your batch's performance, because the class will be serialized at the end of each execute method to update its internal state. This extra serialization results in longer execution time.

    If you're ever not sure if you need it, simply ask yourself two questions: (1) "Does one execute method need data from a previous execute method?", and (2) "Does the finish method need data from any previous execute method?" If the answer to both of these questions is no, then you do not need Database.Stateful. If the answer is yes, then you may want to use Database.Stateful. Keep in mind that there are alternative means to using Database.Stateful, such as storing data in a Custom Setting, which may offer better performance in some cases.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 11:00 PM in reply to: Use of Database.Insert in SOQL?

    Hi,

    Basic use of this -

    If DML database methods (Database.insert) used, then if error occurs the remaining records will be inserted / updated means partial DML operation will be done.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:59 PM in reply to: What is difference between Lightning button () and ui button()

    Hi,

    Note - <ui:button> is going to be deprecated by salesforce soon, so change ui tag to lightning one.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:59 PM in reply to: Difference between and ?

    Hi,

    Note - <ui:button> is going to be deprecated by salesforce soon, so change ui tag to lightning one.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:54 PM in reply to: What is the governor limits of sub query in SOQL?

    Hi,

    Note - Each parent-child relationship adds up to  an additional query.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:52 PM in reply to: How to lock record using SOQL in Salesforce?

    Hi,

    Try this -

    Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];

    Locking Considerations
    While the records are locked by a client, the locking client can modify their field values in the database in the same transaction. Other clients have to wait until the transaction completes and the records are no longer locked before being able to update the same records. Other clients can still query the same records while they’re locked.
    If you attempt to lock a record currently locked by another client, your process waits for the lock to be released before acquiring a new lock. If the lock isn’t released within 10 seconds, you will get a QueryException. Similarly, if you attempt to update a record currently locked by another client and the lock isn’t released within 10 seconds, you will get a DmlException.
    If a client attempts to modify a locked record, the update operation might succeed if the lock gets released within a short amount of time after the update call was made. In this case, it is possible that the updates will overwrite those made by the locking client if the second client obtained an old copy of the record. To prevent this from happening, the second client must lock the record first. The locking process returns a fresh copy of the record from the database through the SELECT statement. The second client can use this copy to make new updates.
    When you perform a DML operation on one record, related records are locked in addition to the record in question.

    Hope this helps.

  • Hi,

    Visualforce and Lightning both offer ways to design and create custom interfaces for Salesforce.
    Visualforce was designed to follow a Page-Centric model. This means that the intent of Visualforce was to create something that was your full page interface with Salesforce. When the user needed to perform some kind of operation, like Save a record, it would send that request to the Salesforce servers and then reload the entire page with the new state of the UI. All backend processing is done with Apex Code on the Server-Side. You have the option to inject JavaScript into the mix to handle some of the Client-Side processing, but it isn't the default interaction methodology. Visualforce was also primarily built for Desktop. When Visualforce was first launched back in 2008 the iPhone had been out for about a year. The concept of designing things "mobile first" hadn't yet been realized, this would come a few years later.
    Visualforce also uses an HTML-like markup language for designing the pages and Apex code to handle the database operations. Here is a breakdown of what you have with Visualforce pages:
    Visualforce Page - HTML-like markup language used to design the layout of the page.
    Standard Or Custom Controller - Apex Code to handle Server-Side operations executed from the Visualforce page (EX: CRUD operations).
    Optional: CSS Styling - Style your Visualforce page to look a specific way within the header or by file reference.
    Optional: JavaScript - Used to handle Client-Side processing or to be coupled with CSS for a cosmetic revamp of the UI.
    Optional: Apex Extensions - These are used to perform logical operations that are not housed within the standard or custom controller.

    Hope this helps.

  • Hi,

    Try this -

    VF page 1 - 

    <apex:page docType="html-5.0" controller="mycontroller" >
    <apex:form >
    <apex:pageBlock >
    <apex:pageBlockSection>
    Date1: <apex:input type="date" value="{!date1}"/>
    Date2: <apex:input type="date" value="{!date2}"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:commandButton value="Display" action="{!display}" />
    </apex:form>
    </apex:page>

    VF page 2 - 

    <apex:page docType="html-5.0" controller="mycontroller" >
    <apex:form >
    <apex:pageBlock >
    <apex:pageBlockSection>
    Date3: <apex:input type="date" value="{!date3}"/>
    Date4: <apex:input type="date" value="{!date4}"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    </apex:form>
    </apex:page>

    Controller - 

    public class mycontroller {

    public date date1 {set;get;}
    public date date2 {set;get;}
    public date date3 {set;get;}
    public date date4 {set;get;}

    public pagereference display()
    {
    date3 = date1;
    date4 = date2;

    pagereference pr = new pagereference('/apex/page2');
    return pr;
    }

    }

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:46 PM in reply to: Exporting records from Dataloader using like operator

    Hi,

    Yes you can use LIKE operator in the query for transfering records from dataloader.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:38 PM in reply to: Is it possible to call javascript function in an apex controller?

    Hi,

    I found this online, try this and let me know-

    Controller - 

    public class showAlertRandom {
    public boolean showAlert { get; set; }
    public Decimal numberValue { get; set; }
    public showAlertRandom() {
    doRandomAlert();
    }
    public void doRandomAlert() {
    numberValue = Math.random();
    showAlert = numberValue < 0.5;
    }
    }

    VF page - 

    <apex:page controller="showAlertRandom" showHeader="true">
    <apex:form id="form">
    <apex:outputText rendered="{!showAlert}" id="alert">
    <script>
    alert('Hello World');
    </script>
    </apex:outputText>
    <apex:outputText rendered="{!not showAlert}" id="noAlert">
    No alert this time, sorry. Random value was: {!numberValue}.
    </apex:outputText>
    <apex:actionPoller interval="5" action="{!doRandomAlert}" reRender="form" />
    </apex:form>
    </apex:page>

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:35 PM in reply to: Refresh parent after child action on inline Visualforce Page

    Hi,

    You can achieve this by using Window opener functionalty of Java script.

    Example -

    function popupSlide(){
    window.open(‘URL’);
    }

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:31 PM in reply to: Adding error messages to nonfield inputs

    Hi,

    I have similar example try this-

    Vf code - 

    <apex:page controller="q204269">
    <apex:form>
    <apex:pageBlock>
    <apex:pageBlockSection columns="1">
    <apex:inputField value="{!record.Name}" />
    </apex:pageBlockSection>
    <apex:pageBlockButtons>
    <apex:commandButton action="{!save}" value="Save" />
    </apex:pageBlockButtons>
    </apex:pageBlock>
    </apex:form>
    </apex:page>

    Controller

    public class Cont{
    public Account record { get; set; }
    public Cont() {
    record = new Account();
    }
    public void save() {
    if(record.Name == null) {
    record.Name.addError('You must enter a value!');
    }
    }
    }

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:26 PM in reply to: Why is Trigger Not Working For Bulk Insert?

    Hi,

    Adding points to your code -

    • You need to put LIMIT 50000 in your query otherwise when more than 50000 records exist in database will give query exception.
    • Try to use one loop instead of two.
    • Most Important - Try to use context variables for the triggers.

    Hope this helps.

Page 28 of 57