Forum Replies Created

Page 24 of 53
  • Hi,

    To delete a note or attachment, you must be the owner of the note or attachment or an administrator with the “Modify all Data” permission. Note ownership is determined by the owner field. Attachment ownership is determined by the created by field. Record owners (except Portal users) can delete attachments on records. Notes and attachments marked as private via the Private checkbox are accessible only to the person who attached them and administrators. For administrators to view private notes and attachments, they need the “View All Data” permission; to edit or delete them, they need the “Modify All Data” permission.

  • Parul

    Member
    September 20, 2018 at 6:53 pm in reply to: How to Salesforce Trigger on Event Object?

    Adding some point;

    The trigger will fire Only when an insertion or updation or deletion or undeletion happens. If the particular event expires the particular record has to be again updated if it is then u can write the trigger for sure.

    But here what happens is if the event is expired then the record will be updated at time ur are logging in so u can write a trigger but it will be fired when u login into your Salesforce account.

    Hope this will help u

    Thanks

  • Parul

    Member
    September 20, 2018 at 6:53 pm in reply to: How to Improve page load speed of Salesforce Visualforce pages?

    Hi,

    Long page sizes directly affect load times. To improve Visualforce page load times:

    1. Cache any data that is frequently accessed, such as icon graphics.
    2. Avoid SOQL queries in your Apex controller getter methods.
    3. Reduce the number of records displayed on a page by:Limiting the data coming back from SOQL calls in your Apex controllers. For example, using AND statements in your WHERE clause, or removing null results
    4. Taking advantage of pagination with a list controller to present fewer records per page
      “Lazy load” Apex objects to reduce request times.
    5. Consider moving any JavaScript outside of the <apex:includeScript> tag and placing it in a <script> tag right before your closing <apex:page> tag. The <apex:includeScript> tag places JavaScript right before the closing <head> element; thus, Visualforce attempts to load the JavaScript before any other content on the page. However, only move JavaScript to the bottom of the page when you are sure it does not adversely affect your page. For example, JavaScript code snippets requiring document.write or event handlers do belong in the <head> element.
    6. In all cases, Visualforce pages must be under 15 MB.
  • Hi,

    Please take reference from the following code

    <select name='menu'>
    <option value='1'>first item</option>
    <option value='2'>second item</option>
    <option value='3'>third item</option>
    <option value='4'>fourth item</option>
    <option value='5'>fifth item</option>
    <option>........
    <option>........
    //I have many options.....
    </select>

     

    select {
    height:50px;
    overflow-y: scroll;
    }

  • Hi,

    Please follow the formula to get the achieve the functionality

    DATE( Year([start date])+floor((MONTH([start date]) + [# of months] - 1) / 12) ,
    mod(MONTH([start date]) + [# of months] -1, 12) + 1 ,
    day([start date])
    ) - 1

  • Parul

    Member
    September 20, 2018 at 6:43 pm in reply to: Will Visual Force Still Supports The Merge Fields Usage Like S-control?

    Yes. Just like S-Controls, Visualforce Pages support embedded merge fields, like the {!$User.FirstName} used in the example.

     

    Thanks

  • Parul

    Member
    September 20, 2018 at 6:41 pm in reply to: What is call back URL in the connected app?

    Hi,

    Callback URL (endpoint) that Salesforce calls back to your application during OAuth. It’s the OAuth redirect URI.Depending on which OAuth flow you use, the URL is typically the one that a user’s browser is redirected to after successful authentication. Because this URL is used for some OAuth flows to pass an access token, the URL must use secure HTTPS or a custom URI scheme. If you enter multiple callback URLs, at run time Salesforce matches the callback URL value specified by the app with one of the values in Callback URL. It must match one of the values to pass validation. Separate multiple callback URLs with line breaks.

    The callback URL field has a limit of 2000 characters, cumulatively. If you enter several URLs and they exceed this limit, create another connected app to manage more callback URLs.

  • Parul

    Member
    September 20, 2018 at 6:38 pm in reply to: How to build custom pagination in salesforce?

    Hi,

    Please take reference from the following code to understand pagination

    <apex:page controller=”Pagination” sidebar=”false” showHeader=”false”>
    <apex:form >
    <apex:pageBlock id=”details”>
    <apex:pageblockTable value=”{!acclist}” var=”acc”>
    <apex:column value=”{!acc.Name}”/>
    <apex:column value=”{!acc.website}”/>
    <apex:column value=”{!acc.AnnualRevenue}”/>
    <apex:column value=”{!acc.Description}”/>
    <apex:column value=”{!acc.Type}”/>
    </apex:pageblockTable>
    <apex:pageblockButtons >
    <apex:commandButton value=”First Page” rerender=”details” action=”{!FirstPage}” disabled=”{!prev}”/>
    <apex:commandButton value=”Previous” rerender=”details” action=”{!previous}” disabled=”{!prev}”/>
    <apex:commandButton value=”Next” rerender=”details” action=”{!next}” disabled=”{!nxt}”/>
    <apex:commandButton value=”Last Page” rerender=”details” action=”{!LastPage}” disabled=”{!nxt}”/>
    </apex:pageblockButtons>
    </apex:pageBlock>
    </apex:form></apex:page>
    ---------------------------------------------------------------------------------------------------------------------------------------------------

    public class Pagination
    {
    private integer totalRecs = 0;
    private integer OffsetSize = 0;
    private integer LimitSize= 10;
    public Pagination()
    {
    totalRecs = [select count() from account];
    }
    public List<account> getacclist()
    {
    List<account> acc = Database.Query(‘SELECT Name, website, AnnualRevenue, description, Type FROM account LIMIT :LimitSize OFFSET :OffsetSize’);
    System.debug(‘Values are ‘ + acc);
    return acc;
    }
    public void FirstPage()
    {
    OffsetSize = 0;
    }
    public void previous()
    {
    OffsetSize = OffsetSize – LimitSize;
    }public void next()
    {
    OffsetSize = OffsetSize + LimitSize;
    }public void LastPage()
    {
    OffsetSize = totalrecs – math.mod(totalRecs,LimitSize);
    }
    public boolean getprev()
    {
    if(OffsetSize == 0)
    return true;
    else
    return false;
    }
    public boolean getnxt()
    {
    if((OffsetSize + LimitSize) > totalRecs)
    return true;
    else
    return false;
    }
    }

  • Parul

    Member
    September 20, 2018 at 6:36 pm in reply to: How can we create a relationship with conga composer in Salesforce?

    Hi,

    we need to add conga queries in conga composer.

    Open conga composer then go to Conga Query tab.
    1.Click New. Type name and description, leave the SOQL Select Statement field blank.
    2.Click Save.
    3.Click Conga Query Builder.

    From Conga Query you can build a relationship for that object with the related object, conga query provide automatic generation of SOQL Statement we just need to choose object and fields.

  • Hi,

    you can use WebMerge to use JPEG Format as an output.

  • Parul

    Member
    September 20, 2018 at 6:31 pm in reply to: Is it possible to create community user through Salesforce Apex?

    Hi,

    It is possible to create community user from apex by putting contactid while creating user.

    following us pseudo for the same

    User u = new user();
    u.LastName = ‘Test Code’;
    u.Email = ‘[email protected]’;

    u.ContactId = contact.Id;
    u.Alias = ‘Tcode’;
    u.Username = ‘[email protected]’;
    u.CommunityNickname = ‘test123’;
    u.LocaleSidKey = ‘en_US’;
    u.TimeZoneSidKey = ‘GMT’;
    u.profileId = ’00e28000001ZWE4′;
    u.LanguageLocaleKey = ‘en_US’;
    u.EmailEncodingKey = ‘UTF-8’;
    insert u;

  • Parul

    Member
    September 20, 2018 at 6:28 pm in reply to: How To Create Many To Many Relationships Between Object?

    Adding some points;

    Salesforce supports 2 kinds of relationships like Master Detail and Lookup. They are both one-to-many relationship, and they are both  defined from the many-to-one side, that is from a child to a parent. They can be made one-to-one relationship by adding validation rules, or maybe triggers to enforce the one-to-one nature, i.e. only one child is allowed.

     

    Junction objects are used to create many to many relationships between objects. If you take the Recruiting application example, you can see that a Position can be linked to many Candidates, and a Candidate can apply for different Positions. To create this data model you need a third object “Job Application” that links the 2.

     

    So you’d create a lookup field for both Position and Candidate object on the “Job Application” object. This will establish many to many relationship between Position and Candidate via the “Job Application” object known as the junction object.

    Hope this will help you.

    Thanks

  • Parul

    Member
    September 20, 2018 at 6:27 pm in reply to: How To Restrict Any Trigger To Fire Only Once?

    Triggers can fire twice, once before workflows and once after workflows, so must follow the best practice and order of execution of trigger.

     

    Thanks

  • Parul

    Member
    September 20, 2018 at 6:26 pm in reply to: Is there any limitation to load fields for mapping in webmerge?

    Hi,

    The maximum limit that can be use 3000 fields to map to your template.

  • Hi,

    go to the OWD:

    From Setup, enter Sharing Settings in the Quick Find box, then select Sharing Settings.

    Click Edit in the Organization-Wide Defaults area.

    For each object, select the default access you want to use. If you have external organization-wide defaults, see External Organization-Wide Defaults Overview.

    To disable automatic access using your hierarchies, deselect Grant Access Using Hierarchies for any custom object that does not have a default access of Controlled by Parent.
    Note

    If you are increasing the default access, such as from Public Read Only to Public Read/Write, your changes take effect immediately. All users get access based on the updated default access. Sharing recalculation is then run asynchronously to ensure that all redundant access from manual or sharing rules are removed.

  • Parul

    Member
    September 20, 2018 at 6:23 pm in reply to: What Are Global Variables Explain With Examples?

    Adding some points:

    Global variable is a type of merge field that yields information about the organization or the current user of the platform. Each global variable is easily identified because it distinctly starts with a dollar sign “$”.

    Global variables are used in conjunction with other merge fields to reference important data about the organization. Customized links, formulas, buttons, and Visualforce pages allow the use of various global variables.

     

    Thanks

  • Hi,

    There are few option from which you can choose any one according to your comfirt.

    Hello Madhulika,

    1.  You can enable readOnly attribute value true for the page it will increase Number of query rows from 50000 to 1 million rows and Number of records displayed on VF page will be increased from 1000 to 10000.
    2. You can go for pagination which has to limit.
  • Parul

    Member
    September 20, 2018 at 6:21 pm in reply to: Is There Any Way To Control The Sequence Of Execution Of These Triggers?

    Adding some points :
    The following is the order Salesforce logic is applied to a record.

    • Old record loaded from database (or initialized for new inserts)
    • New record values overwrite old values
    • System Validation Rules
    • All Apex “before” triggers
    • Custom Validation Rules
    • Record saved to database (but not committed)
    • Record reloaded from database
    • All Apex “after” triggers
    • Assignment rules
    • Auto-response rules
    • Workflow rules
    • Escalation rules
    • Parent Rollup Summary Formula value updated (if present)
    • Database commit
    • Post-commit logic (sending email)

    Additional notes: There is no way to control the order of execution within each group above.
    Thanks

  • Parul

    Member
    September 20, 2018 at 6:19 pm in reply to: How To Read The Parameter Value From The Url In Apex?

    Here is the code snippet

    public Id oppid{get;set;}

    Id id = apexpages.currentpage().getparameters().get('id');

    <apex:inputField value="{!$CurrentPage.parameters.Paramtervalue}"/>

     

    Thanks

  • Parul

    Member
    September 20, 2018 at 6:17 pm in reply to: Explain The Need Or Importance Of The Controller Extension in Salesforce?

    controller extension is very important it's an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when: You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.
    You want to add new actions.

    You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.

    Thanks

  • Parul

    Member
    September 20, 2018 at 6:16 pm in reply to: What Is The Controller Extension?

    Hi

    A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when: You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.
    You want to add new actions.
    You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.

     

     

  • Parul

    Member
    September 20, 2018 at 6:15 pm in reply to: How to insert null values into dataloader?

    Hi,

    Please follow steps

    Data Loader  --> settings  -->  Check Insert null Values. It works.

  • Parul

    Member
    September 20, 2018 at 6:14 pm in reply to: What Is Property In Salesforce Apex? Explain With Advantages?

    Here is some points more:

    Apex property is similar to a variable, they can validate data before a change is made; they can prompt an action when data is changed, such as altering the value of other member variables; or they can expose data that is retrieved from some other source, such as another class.

    Thanks

  • Parul

    Member
    September 20, 2018 at 6:11 pm in reply to: What is recursive workflow rule? How to avoid recursive workflow rules.

    hi,

    To Stop Recursion in Workflow make sure following while configuring your workflow rule:

    1. Make sure your workflow rule criteria is :
    created, and any time it’s edited to subsequently meet criteria
    Explanation:  (Default) Evaluate the rule criteria each time a record is created or updated.

    For a new record, run the rule if the rule criteria is met.
    For an updated record, run the rule only if the record is changed from not meeting the rule criteria to meeting the rule criteria.

    With this option, the rule can run multiple times per record, but it won’t run when the record edits are unrelated to the rule criteria.

    For example, suppose that for an opportunity record to meet the rule criteria, the opportunity probability must be greater than 50%. If you create an opportunity with a probability of 75%, the workflow rule runs. If you edit that opportunity by changing the probability to 25%, the edit doesn't cause the rule to run. If you then edit that opportunity by changing the probability from 25% to 75%, the edit causes the rule to run. With this last edit, the rule runs, because the record is changed from not meeting the rule criteria to meeting the rule criteria.

    Above will make sure that workflow rule is not fired if entry criteria condition was already satisfied.

    One more thing that In workflow actions if there is a Field Update then make sure it does not have Evaluate Workflow Rules in except it is required otherwise.

  • Parul

    Member
    September 20, 2018 at 6:10 pm in reply to: How To Get All The Required Fields Of Sobject Dynamically?

    HI

    I think there is no direct property available in Apex dynamic API to represent the required field. However, there is another way to know about it.
    If any field has below three properties then it is the mandatory field.
    1.                  If it is Creatable
    2.                  If it is not nullable and
    3.                  If it does not have any default value

     

     

    Thanks

Page 24 of 53