Forum Replies Created

Page 10 of 12
  • Hi Mohit,

    You can prevent the assignment of case to the user who is not currently logged in salesforce by Creating a formula field in the case that assign value of Current user id .
    Then in the case assignment rule use the formula
    ($User.Id== formula field in case )

    Create rule for each user with same formula.

    Hope this helps you.

    Thanks

  • Hi Tanu,

    For creating a custom list view button , first of all you need to make a visualforce page with standardController and extensions for apex class in which you perform your multi-record handling , then you need to create Custom Buttons and Links with display type "List Button" and Content Source "Visualforce Page" and select your visualforce page in content and save it.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    October 6, 2016 at 7:21 am in reply to: How to add radio button to a pageblock table in salesforce?

    Hi Tanu,

    To add radio button to page block table you can use html tag

    <input type="radio">

    Hope this helps you.

    Thanks

  • Hi Mohit,

    In some cases, you can’t immediately deactivate an account (such as when a user is selected in a custom hierarchy field). To prevent users from logging into your organization while you perform the steps to deactivate them, you can freeze user accounts. For example, let’s say a user, Scarlett, just left your company and you want to deactivate her account. However, she’s selected in a custom hierarchy field, so you’ll need to perform some more steps to remove her from the field. Since you can’t immediately deactivate her account, you can freeze it in the meantime.

    In almost all cases, Freezing should be done first since it is easily reversible. Deactivation on the other hand has LOTS of consequences and can't easily be undone. Deactivation should only be done if you are 100% sure all the prep work is done.

    Hope this helps you.

    Thanks

  • Hi Tanu,

    Basically both are completely different.

    Formula field are used when there has to be a Formulated value also to be displayed in another field etc.

    Formulas are run only when the record is loaded.

    Whereas Workflow used when based on a certain criteria we have to update a field automatically.

    Workflows are used based on Save / Edit of a record.

    Hope this helps you.

    Thanks

  • Hi Tanu,

    Yes , you can achieve this using the eclipse for the entire fields to make the query.

    Thanks

  • Hi Tanu,

    You can resize the iframe with JavaScript after you know the size of the browser viewport:

    <apex:page sidebar="false">
    <apex:iframe src="https://www.salesforce.com/" id="theFrame" />
    <script>document.getElementById('theFrame').height = window.innerHeight - 220;</script>
    </apex:page>

    Leave about 220 pixels for the Salesforce header and footer.

    Hope this helps you.

    Thanks

  • Hi Tanu,

    I don't think it's possible right now with Generally Available functionality. Your only option might be Lightning Extensions, currently a pilot feature. Or, for a much higher level of effort, you could build a Visualforce page for an action override.

    Or if you want to create a tab for custom object , it is easily possible in both salesforce classic and lightning.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    October 3, 2016 at 6:27 am in reply to: What sObject properties doesn't cause trigger to fire in salesforce?

    Hi Mohit,

    There are many operations like some system bulk operations don't invoke triggers:

    • Cascading delete operations.
    • Cascading updates of child records that are reparented as a result of a merge operation
    • Changing a user's default division with the transfer division option checked
    • Changes to the following objects:
      BrandTemplate
      MassEmailTemplate
      Folder
    • Mass address updates
    • Mass approval request transfers
    • Mass campaign status changes
    • Mass division transfers
    • Mass email actions
    • Managing price books
    • Modifying custom field data types
    • Renaming or replacing picklists
    • Update account triggers don't fire before or after a business account record type is changed to person account (or a person account record type is changed to business account.)
    • Inserts, updates, and deletes on person accounts fire Account triggers, not Contact triggers.
    • Content pack operations involving the ContentVersion object, including slides and slide autorevision, don't invoke triggers.
    • Triggers on the Attachment object don’t fire when:
      the attachment is created via Case Feed publisher.
      the user sends email via the Email related list and adds an attachment file.

    Hope this helps you.

    Thanks

  • Hi Tanu,

    You can obtain the object type from an Id directly using the Id.getSObjectType method.

    And this code gives you the object name:

    public class KeyPrefix
    {
    private static Map<String,Schema.SObjectType> gd;
    private static Map<String, String> keyPrefixMap;
    private static Set<String> keyPrefixSet;

    private static void init() {
    gd = Schema.getGlobalDescribe();
    keyPrefixMap = new Map<String, String>{};
    keyPrefixSet = gd.keySet();
    for(String sObj : keyPrefixSet)
    {
    Schema.DescribeSObjectResult r = gd.get(sObj).getDescribe();
    String tempName = r.getName();
    String tempPrefix = r.getKeyPrefix();
    keyPrefixMap.put(tempPrefix, tempName);
    }
    }
    public static String GetKeyPrefix(String ObjId)
    {
    init() ;
    String tPrefix = ObjId;
    tPrefix = tPrefix.subString(0,3);
    String objectType = keyPrefixMap.get(tPrefix);
    return objectType;
    }
    }

    Now pass your id in Execute anonymous window like this to get the object name

    System.debug('@@@ '+ KeyPrefix.GetKeyPrefix('0012800000sa1Vs') );

    Hope this helps you.

    Thanks

  • Hi Mohit,

    Yes, Changes in rollup summary field can cause trigger to fire.

    If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure. If the parent record is updated, and a grandparent record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the grandparent record. Grandparent record goes through save procedure.

    So,when the child record is saved and the field feeds into the roll-up summary the parent trigger is executed.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 29, 2016 at 5:34 am in reply to: How are Roll-Up Summary fields calculated in the Salesforce database?

    Hi Tanu,

    A roll-up summary field calculates values from related records, such as those in a related list. You can create a roll-up summary field to display a value in a master record based on the values of fields in a detail record. The detail record must be related to the master through a master-detail relationship. For example, you want to display the sum of invoice amounts for all related invoice custom object records in an account’s Invoices related list. You can display this total in a custom account field called Total Invoice Amount.

    You can perform different types of calculations with a roll-up summary field. You can count the number of detail records related to a master record. Or, you can calculate the sum, minimum value, or maximum value of a field in the detail records.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 29, 2016 at 5:31 am in reply to: What is the purpose of using Datetime.dateGMT() function in Salesforce?

    Hi Mohit,

    DateTime: A value that indicates a particular day and time, such as a timestamp.

    Date: A value that indicates a particular day. Unlike Datetime values, Date values contain no information about time.

    DateTime.dateGmt(): This function returns the Date component of the GMT representation of the exact moment in time represented by the DateTime.

    In contrast, DateTime.date() returns the Date component of the context's user's timezone's representation of the DateTime.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 28, 2016 at 6:03 am in reply to: How to display an error message checking in salesforce visualforce page?

    Hi Mohit,

    You can use these mention below error messages in vf page.

    • ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL,'Please enter Account name'));
    • ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please enter Account name'));
    • ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'Please enter Account name'));
    • ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'Please enter Account name'));
    • ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'Please enter Account name'));

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 28, 2016 at 5:57 am in reply to: Is the following TRUE or FALSE for Salesforce? (See description)

    Hi Tanu,

    Yes, It is  true by modify all data permission user must be able to delete.

    • 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.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 27, 2016 at 5:39 am in reply to: Can we pass parameter to the visual workflow in Salesforce and how?

    Hi Mohit,

    Yes, We can pass parameter to the flow using the standard HTM url parameters.

    For Eg.

    From the lead page you can have a link to launch a flow on Lead and pass the leadID after salesforce.com as the following

    salesforce.com/flow/myLeadFlow?paLeadID={!ID}

    where paLeadID is the unique name of the variable in flow.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 27, 2016 at 5:23 am in reply to: What is recursive trigger in salesforce?

    Hi Mohit,

    A recursive trigger is one that performs an action, such as an update or insert, which invokes itself owing to,  say something like an update it performs.

    Eg. In a before trigger, if you select some records and update them, the trigger will invoke itself.

    In order to avoid the situation of recursive call, make sure your trigger is getting executed only one time. To do so, you can create a class with a static Boolean variable with default value true.

    In the trigger, before executing your code keep a check that the variable is true or not.

    Once you check, make the variable false.

    Hope this helps you.

    Thanks

  • Hi Abhay,

    Yes, You can restore the deleted reports or dashboard in Salesforce. The Recycle Bin link in the sidebar lets you view and restore(undelete) recently deleted records for 15 days before they are permanently deleted.

    Hope this helps you.

    Thanks

  • Hi Tanu,

    Yes, you can do that , by simply use inputCheckbox for value and outputText for label.

    Try to do this:

    <apex:inputCheckbox value="{!Account.Name}" />
    <apex:outputText >AccountName</apex:outputText>

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 23, 2016 at 6:15 am in reply to: How can we get the userinfo in batch in Salesforce?

    Hi Mohit,

    You can use UserInfo Class methods for this.

    Like: UserInfo.getUserId();
    UserInfo.getUserEmail();

    Note, this will get information for the user that scheduled the Job in the first place which may/may not be what you need.

    If you needed the same details for say a record owner, you would need to access that from the User object (using the OwnerId field as a lookup to User) within the execute() method itself.

    Hope this helps you.

    Thanks

  • Hi Mohit,

    If you have your code written directly in the trigger or in a class designated without sharing, then the apex code can update records that are locked, regardless of the user who caused the trigger to fire.

    If you use code in a class marked with sharing that is called by the trigger, then you will get an exception. If the trigger was executed by an Administrator, then the code will always run.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 22, 2016 at 5:37 am in reply to: How to iterate map in Salesforce Lightning Component?

    Hi Tanu,

    You can only defined to iterate over a List, According to the Aura docs.

    If you have not seen the Aura docs app before, it is available with any Salesforce instance by modifying the URL:

    [your instance stuff].salesforce.com/auradocs/reference.app

    Or to navigate to the page for the iteration component:

    [your instance stuff].salesforce.com/auradocs/reference.app#reference?descriptor=aura:iteration&defType=component

    Hope this helps you.

    Thanks

  • Hi Mohit,

    • <apex:include> is used when you want to insert that page as it is in your current page. The entire contents of that page is copied in your current page.
    • <apex:component> is defining a component before using it. In simple words, lets  say you define that 'myValue' component is a string type but the value to that string will be assigned in the destination page.

    Hope this helps you.

    Thanks

     

     

  • Hi Mohit,

    The keyword this is used to explicitly call out that the code is referencing a member of the object. Using it indicates that you explicitly want the member belonging to this instance (as opposed to a static, base, or super instance related to your object.)

    Most often this is used to differentiate between constructor variables and member variables of the same name (or in other cases where it's ambiguous which variable you're referring to).

    This keyword used to represent the current instance of the class.We use this keyword to differentiate between class instance variable and local variable.

    Hope this helps you.

    Thanks

  • PRANAV

    Member
    September 19, 2016 at 5:12 am in reply to: Can We Create Custom Objects in Salesforce Group Edition?

    Hi Ashley,

    Yes you can create custom objects in salesforce group edition but only upto 50 that's the limitation.

    Hope this helps you.

    Thanks

     

Page 10 of 12