Forum Replies Created

Page 4 of 7
  • Gourav

    Member
    June 7, 2016 at 3:46 pm in reply to: Audio Player as Custom Field

    Intriguing use-case you have here. I don't believe there would be any way to render in something as complex as an audio player from a formula field (or at least, no way that would be relatively simple/lightweight and secure).
    My suggestion would be to make a Visualforce page embedded on the page layout, and have it display the audio player using apex:flash or maybe raw JavaScript depending on what kind of audio player you intend to use.

    edit: Apparently, HTML5 directly supports audio as long as your clients are using a browser modern enough for HTML5

  • Gourav

    Member
    June 7, 2016 at 3:45 pm in reply to: What makes marketing cloud different from other clouds?

    Across marketing, sales and service, Marketing Cloud focuses on the 1-to-1 customer journey through all connected devices on every channel. Connect interactions from anywhere, combining customer data and behaviors to create relevant communications that are delivered in real time, on your customers’ terms.

     

  • Gourav

    Member
    June 7, 2016 at 3:44 pm in reply to: Enterprise Territory Management

    Salesforce’s original territory management feature lets you grant users access to accounts based on criteria such as postal code, industry, revenue, or a custom field relevant to your business. Enterprise Territory Management builds upon the original feature by introducing territory types, territory models, and territory model states. These components let you create and preview multiple territory structures and strategies before you activate and implement the one that works best. Enterprise Territory Management also offers easier assignments between territories, accounts, and opportunities. Custom reports help you organize your territory model for optimum coverage, assess territory effectiveness, and modify your model if necessary. Your team can use Chatter to collaborate as you design and build your territory model.

  • Gourav

    Member
    June 7, 2016 at 3:42 pm in reply to: Account (lookup) through picklist on Flow Designer

    Try this link

    http://www.jitendrazaa.com/blog/salesforce/creating-lookup-field-in-flow/

    However, because the picklist was so small for me, I was able to spoof it by creating two variables: one for the account ID and one for the account name

    Then I created dynamic search results based on "NOT EQUAL TO: asdfasdfsafdds" which gave me all of the results. Added "Name" to choice label and ID to choice stored value. Then assigned the record fields to variables where ID = accountIDVar, and Name = AccountNameVar.

    On my create record step, I simply assigned the var's

  • Gourav

    Member
    June 7, 2016 at 3:37 pm in reply to: Display Single Opportunity with Fade out / Fade In

    Try this link hope it will help you:- http://api.jquery.com/fadeout/

  • Gourav

    Member
    June 2, 2016 at 2:01 pm in reply to: What actions ignore field level security in Salesforce?

    Formula fields can ignore the Field-Level Security. For example say you created a field called Number Field on Opportunity of type Number with access permissions to the System Administrator. Also you created an another field called Formula Field on Opportunity of type Formula returning a Number and configured the access permissions to both the System Administrator and the Standard User. This formula field evaluates to Number_Field__c / 2.

    Now, by the permissions the Standard User should not be able to read and edit the Number Field on Opportunity. But, the Formula Field on Opportunity will still show a value of say 500 if the Number Field on Opportunity had a number say 1000 which was earlier created by an another System Adminstrator.

  • Gourav

    Member
    June 2, 2016 at 1:58 pm in reply to: Dynamic query field values to custom setting fields?

    You add the fields to the custom setting through the Setup UI or through other tools. Then you use the "Manage" option to edit the setting. To reference it in code (assuming it is a list custom setting that you need a key for):

    BatchCriteria__c bc = BatchCriteria__c.getInstance(keyValue);

    String whereTerm = '';
    if (!String.isEmpty(bc.Where1__c)) whereTerm += bc.Where1__c;
    if (!String.isEmpty(bc.Where2__c)) whereTerm += bc.Where2__c;
    if (!String.isEmpty(bc.Where3__c)) whereTerm += bc.Where3__c;
    if (!String.isEmpty(bc.Where4__c)) whereTerm += bc.Where4__c;

  • There is no configuration through which this can be achieved easily. This can be done via a trigger.

    Create a trigger on CampaignMember for after insert, after update, after delete and after undelete.
    Get the unique campaign Ids from Campaign Members
    Create a aggregate query and group by Campaign Id and Account Id.
    The aggregate query should be able to give you the unique count which you can update on Account. You might also require triggers on Contact and Account for handling situations such as Account update on Contact, Contact deletion, Account deletion.

  • Gourav

    Member
    June 2, 2016 at 1:39 pm in reply to: Sorting in Map

    Map do not hae sorting supported, they are a key value pair collection. Now for your issue you need a sorting algo to work and create a list of key according to the order you want. You can use linear search algo or bubble sort from data structure. Please ask if any issue. Or you can use below method to sort map keys.

    Map<String, String> storedMap = new Map<String, String>{'c'=>'Value3', 'a'=>'Value1', 'd'=>'Value4', 'b'=>'Value2'};
    for(String key: getSortedKeyset(storedMap)) {
    system.debug('Result: '+storedMap.get(key));
    }

    public List<String> getSortedKeyset(Map<String, String> dataMap) {
    List<String> keySetList = new List<String>();
    keySetList.addAll(dataMap.keySet());
    keySetList.sort();
    return keySetList;
    }

  • You said you were using a process. Can you set the action criteria to make sure that the neccessary fields are set correctly? When using an auto launched flow, I'm not sure how to display a custom error message at save. If you can't edit your process to make sure that your flow only fires when the fields are set correctly, some more information might help. The details of the process, the way the flow works, and what objects are involved in this whole set of automation. Some of those details may help, they may not, but everyone that has an idea will know better what will and won't work, Thanks in advance.

  • Gourav

    Member
    June 2, 2016 at 1:33 pm in reply to: XML to migrate Salesforce Record Type using Ant?

    try this xml hope this will help you:-

    <?xml version="1.0" encoding="UTF-8"?>
    <Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
    <members>Account.Sample1</members>
    <members>Account.Sample2</members>
    <name>RecordType</name>
    </types>

    <types>
    <members>*</members>
    <name>Profile</name>
    </types>
    <types>
    <members>*</members>
    <name>Layout</name>
    </types>
    <version>30.0</version>
    </Package>

  • Gourav

    Member
    June 2, 2016 at 1:14 pm in reply to: How to get all event from a time interval using SOQL?

    Change user start time and End time in GMT and then use in where clause in SOQL. Try this example

    Datetime startDt = Datetime.valueOfGmt(startTime);
    Datetime.endDt = Datetime.valueOfGmt(endTime);

    now use this in query events in start date and end date.

  • Gourav

    Member
    June 2, 2016 at 1:02 pm in reply to: Is there any facility of garbage collection in Apex?

    Garbage collection is undocumented.

     

    Here's what I think I know:

     

    * Heap size is apparently tracked as a system variable that is adjusted after every line of script.

    * Symbols (i.e. variable names) do not use heap space, only the variables they contain. Null variables, therefore, take no heap space.

    * Governor limits appear to be checked only periodically, so a brief burst over the legal limit is possible, but not advised in any case.

    * Removing an array index, assigning a null value, etc, appears to immedately free heap space.

    * Assigning a new variable, adding an array index, etc, appears to immediately consume heap space.

     

    It's important to note, I guess, that the question of garbage collection is pointless, because either you exceed your limit and you get the boot, or you stay within the limits, and you do not get the boot. Just know that garbage collection works in your favor (i.e. it assumes you're really trying to not exceed any limits), by at least appearing to immediately reclaim free heap space.

     

    I suspect that the heap is periodically defragmented, but there is literally no way to prove or disprove that theory, since memory addresses are never exposed to the developer.

  • Gourav

    Member
    June 1, 2016 at 10:16 am in reply to: Update fields of an objects

    Try some conditions to filter the number of fields on object and then try to execute it.

  • Gourav

    Member
    June 1, 2016 at 10:13 am in reply to: How to enable middle name for contacts in Salesforce?

    These are the steps to enable middle name in salesforce on contact

    • Contact salesforce.com Customer Support to enable the new fields.
    • Click Setup | Customize | User Interface.
    • In the Name Settings section, select Enable Middle Names for Person Names and Enable Name Suffixes for Person Names.
    • Click Save.
  • Gourav

    Member
    June 1, 2016 at 10:09 am in reply to: How can we disable the inline editing of records in Salesforce?

    Hi,
    I was able to disable the InLine Editing after overriding the Edit Button with this code in the s-control

    <html>
    <head>
    <script src="/soap/ajax/8.0/connection.js">
    </script>
    <script>
    function init()
    {
    window.parent.location.href = "{!URLFOR($Action.Donation__c.Edit, Donation__c.Id,[retURL=URLFOR($Action.Donation__c.Edit, Donation__c.Id)], true)}";
    }
    </script>
    </head>
    <body onload="init()">
    <p>&nbsp;</p>
    </body>
    </html>

    When the edit button is clicked the control is transfered to the edit page propoerly, but when I click the save button. The record is saved and the same page is displayed, it does not go back to the details page (with inline editng and edit button) even when I press the cancel button the same page is display as the control is being transfered to the s-control which is transfering back to the edit page, is there some way to disable this on the edit page is displayed..
    can i do something like this..
    <html>
    <head>
    <script src="/soap/ajax/8.0/connection.js">
    </script>
    <script>
    function init()
    {
    if (Page is Detals_Page)
    window.parent.location.href = "{!URLFOR($Action.Donation__c.Edit, Donation__c.Id,[retURL=URLFOR($Action.Donation__c.Edit, Donation__c.Id)], true)}";
    Else
    window.parent.location.href = "{!URLFOR($Action.Donation__c.view , Donation__c.Id,[retURL=URLFOR($Action.Donation__c.view,
    }
    </script>
    </head>
    <body onload="init()">
    <p>&nbsp;</p>
    </body>
    </html>
    Hope this will help you also.

  • Yes. Salesforce can help you successfully deploy a community that is on a non-Salesforce portal, or even another community platform. We can also connect you with Salesforce partners who can help make the process easier.

  • Gourav

    Member
    June 1, 2016 at 10:07 am in reply to: Email not sent

    In this case if your class is not working properly then I suggest you look into it may be you miss something in that. if problem still persist then please provide your code, so we can help.

  • Gourav

    Member
    June 1, 2016 at 10:03 am in reply to: Can I create a popup/alert window/message when a SF page loads?

    Is there a reason that you can't use a standard javascript alert? Here is a 'complete' VisualForce page using such a popup:

    window.document.onload = new function(e)
    {
    if({!Contact.Some_Checkbox__c})
    {
    alert("Checkbox is True");
    }
    else
    {
    alert("Checkbox is False");
    }
    }
    </script>

     

    If the custom checkbox field 'Some Checkbox' on the contact record used in the URL (which would be "http://someinstance/apex/ThePage?id=") the popup will say 'Checkbox is True' and vice versa.

  • Firstly all before trigger will fire and at last all After triggers will be fired. But if you want to synchronize before/after triggers then in case you can't, it totally depend upon system to run trigger.

    It is the general flow of execution before insert -> before update -> after insert -> after update

  • Gourav

    Member
    June 1, 2016 at 9:54 am in reply to: How to import data based on external id field?

    An External ID field can be used to match or relate Object A records when importing Object B records without having Object A's Salesforce Ids. External Ids are commonly used to store unique record identifiers from external systems and allow for routinely loading data into Salesforce without having to prepare your file with existing or related Salesforce record Ids each time.
    1. Identify an existing External ID field on Object A that you'd like to use for matching or create an External Id via a new custom field  (Data Type 'Text') on 'Object A' and select the External ID and Unique field attributes. See Create Custom Fields​, Custom Field Attributes​ and What is an external ID? for more details.
    2. Populate the newly created External ID field for Object A records in Salesforce so that you may use it as the matching criteria upon importing object B records by creating a .csv file containing all Object A records:
    - If Object A records already exist in Salesforce you may Build a Report and Export a Report or alternatively use the Data Loader to Export Data. Be sure to include the Object A record's Salesforce Ids in your report or export file in order to perform an update to the record's new External ID field.

    - If importing new records identify a column that contains data that would serve as a unique identifier for Object A records. Typically, this would be from a system outside of Salesforce and ideally these unique values for Object A records would already be contained in your Object B import file or commonly contained in files from an external system.
    3. Perform an Insert for new records or an Update for existing records to Object A, mapping required fields (be sure to include and map Salesforce Id for an update or upsert operation) and the External ID column to the Object A record's External ID field from step 1. The goal is to populate a unique External ID value in Salesforce for all of Object A's records. See Insert, Update, or Delete Data Using Data Loader​ for more details.
    4. Prepare your Object B file with the related Object A record's corresponding External ID values you'd like to use for matching in order to populate the lookup field from Object B to Object A:
    - ​​In the .csv file for Object B, choose an existing column containing the unique data that matches the External ID values you set for Object A's records in steps 1-3 or create a new column named External ID and manually populate it or use Excel's vlookup function to bring over the External ID values set on Object A records.
    5. Click on Upsert in the Data Loader, choose the appropriate object (Object B in our example), Browse... and select your import file for Object B and click Next >.
    6. In Step 2b: Choose your related objects select the External Id field for the Object A dropdown to use the External ID field for matching related Object A records upon importing Object B records.
    7. In Step 3: Mapping there should be a Salesforce field with the following name syntax: [ObjectName]:[ExternalIDField__c] where in our example, [ObjectName] is "Object A" and [ExternalIDField__c] is the API name of object A's External Id field from step 1. Drag and drop this field to map it to your Object B file's column containing the External Id values for Object A's records.
    By doing this you can easily relate the Object B records to the Object A records using the External ID that you created. This eliminates the process of importing Object A records, Exporting the new IDs, matching them up in Excel and then importing the child records.

  • Gourav

    Member
    June 1, 2016 at 9:53 am in reply to: Code coverage
  • Gourav

    Member
    June 1, 2016 at 9:50 am in reply to: How to fire a trigger on formula field change?

    Basically, formula doesn't store any value. Formula is executed only when you retrieve it - use show this field on VF page or use formula field for your calculations in Apex code to fire trigger.

  • Gourav

    Member
    May 31, 2016 at 3:29 pm in reply to: Mini Page Layout Hovers in Managed Package

    I would recommend that you create a VF-page and recreate the hover-content as you require it and then use a Tooltip Library to show the entire VF-page. Therefore you can have a look e. g. at Tooltipser http://iamceege.github.io/tooltipster/

Page 4 of 7