Forum Replies Created

Page 29 of 57
  • shariq

    Member
    September 19, 2018 at 10:21 PM in reply to: How to execute Apex from Custom button or Javascript?

    Hi,

    You need to create action function in vf page which will call apex, action function will be called by js.

    So indirectly you are calling apex from js.

    Hope this helps.

  • Hi,

    By veiwing your code I found haven't close the brackets correctly in -

    IF(‘{!Account.Type}’ == “New”) && ‘{!Opportunity.Ad__c}’ == null{

    Close the bracket at the end of null.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:15 PM in reply to: Is it possible to make a cross filter report of Products?

    Hi,

    Adding points relatted to it -

    The report type should be Accounts with Activities (or with and without, whatever), and then you a cross-filter to filter for only Accounts without Opportunities.

    Cross-Filters only work on the primary object, so there are many cases (like Activities with Accounts, or Contacts & Accounts where you need to create a Custom Report Type to get it to work properly).

    Here is my Accounts with/without Activities report type, with a Cross-Filter to only bring back Accounts without Opportunities

    Cross filters are only available when the report type is reporting on two different objects.  The Activities with Accounts report is really only reporting on the activities object while referencing fields on accounts.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 10:09 PM in reply to: Lock/Unlock Record of an object

    Hi,

    Through  Record Types & Workflow/Process Builder

    In this approach, you need to create 2 page layouts.  I’m calling them – “EditablePageLayout” and “ReadOnlyPageLayout”.  The editable page layout is the existing normal page layout you already have.  The read only page layout will have all the fields in read-only mode i.e., for every field in this page layout, you have to click the settings icon and check the ‘Read Only’ check box as shown below.

    Once you have the page layouts ready, create 2 record types and assign the page layouts to the record types.

    Now create a workflow rule – when opportunity stage is in “Negotiation/Review”, we need to change the page layout from EditablePageLayout to ReadOnlyLayout.  To change the pagelayout, we need to change the record type for that record using workflow. Here’s how the workflow looks like.

    And then create a workflow field update to set the Record type.

    That’s it, save the workflow field update and activate the workflow.  When the opportunity is moved to ‘Negotiation/Review’ stage, the page layout changes to ReadOnlyPagelayout and the users cannot edit it anymore.

    Note: With the 1st approach, every time user creates a new Opportunity, the user is asked to choose the record type! To skip this, you just have to remove the ReadOnly Record Type from the user’s Profile (and set the main record type as default).  Even without record type permission, the user will still be able to view the Readonly record.  Also, System Administrator would be still able to edit the record.

    Tip : Instead of a workflow, you can of course use Process Builder to implement the  logic for switching of record types from Editable to Read Only.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:47 PM in reply to: How to set expire a link after one time click in Salesforce

    Hi,

    You need to use standard class JwtToken which generates token encoded from sobject field's values and append that token in URL. This class gives the functionality to expire the token within some time limit or immediate depend upon youe logic.

    Hope this helps.

  • Hi,

    Add more about custom setting -

    Custom settings is an standard object of the salesforce platform, where you can save your settings and associate it to the profile or user.

    Here is some info from the official doc:

    Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. All custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database. This data can then be used by formula fields, validation rules, Apex, and the SOAP API.
    Generally you can use custom settings for the parameter that can not be stored in the profile or user object. For example "Google Maps Key" for all profiles or whole org. Or region for the specific profile

    Hope this helps.

  • Hi,

    Note - An outbound message is inteneded for another system to automatically receive a message - it is a SOAP based XML post intended to be received by another system that has exposed a web-service.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:37 PM in reply to: What is the use of Custom Label in Salesforce?

    Hi,

    Custom label in apex code salesforce example. We can use System.Label.labelName to access custom label in apex code. Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values can be translated into any language Salesforce supports.

    Hope this helps.

  • Hi,

    SOQL Statements
    SOQL statements evaluate to a list of sObjects, a single sObject, or an Integer for count method queries.

    You can also create new objects from SOQL queries on existing ones.

    SOSL Statements   

    sObjects, where each list contains the search results for a particular sObject type. The result lists are always returned in the same order as they were specified in the SOSL query.SOSL queries are only supported in Apex classes and anonymous blocks. You cannot use a SOSL query in a trigger. If a SOSL query does not return any records for a specified sObject type, the search results include an empty list for that sObject.

    Hope this helps.

  • Hi,

    Standard Controllers
    Contains the same functionality and logic that are used for standardSalesforce pages. Can be used with standard objects and custom objects.

    Custom Controllers
    Need finer control for how information is accessed for your page, you can write a custom controller or a controller extension using Apex. Only one Apex class is used.

    Hope this helps.

  • Hi,

    One reason may be that Set<SObject> is a risky mechanism to use: equality is based on all the fields (so is expensive) and if fields are changed logic can easily break. Same problem using SObject as a Map key. So not a pattern to be encouraged.

    But perhaps just because also supporting Set<SObject> adds a bunch of extra methods that need documenting and supporting

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:30 PM in reply to: Is there any development environment in Salesforce Marketing Cloud ?

    Hi,

    I searched online and found there is no development environment in Salesforce Marketing Cloud.

    Hope this helps.

  • Hi,

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:24 PM in reply to: How to create custom objects/setting using Apache Ant in Salesforce?

    Hi,

    Apache Ant is a Java library and command-line tool. Ant was originally used for building Java applications, but Salesforce.com supplies extra libraries to enable Ant to move metadata between a local directory and a Salesforce org. The Ant-Salesforce Libraries are known as the Force.com Migration Tool. There are many methods for migrating metadata (change sets, for example).

    <?xml version="1.0" encoding="UTF-8"?>
    <Package xmlns="<a href="http://soap.sforce.com/2006/04/metadata" target="_blank" rel="nofollow">http://soap.sforce.com/2006/04/metadata</a&gt;">
    <fullName>test</fullName>
    <types>
    <members>testss__c</members>
    <name>CustomObject</name>
    </types>
    <types>
    <members>testss__c.fields__c</members>
    <name>CustomField</name>
    </types>
    <types>
    <members>testss__c.fields2</members>
    <name>CustomField</name>
    </types>
    <version>20.0</version>
    </Package>

    Hope this helps.

  • Hi,

    Note: If you're not getting an option to give login access to Salesforce Support, please check your Organization's Login Access Policies (from Setup, click Security Controls | Login Access Policies), and ensure that "Available to Administrators Only" is not selected for Salesforce.com Support. If it's selected, please change it to "Available to Users."

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:19 PM in reply to: How many records can we display on page for a report in Salesforce?

    Hi,

    Rows displayed in a report Up to 2,000. To view all the rows, export the report to Excel or use the printable view for tabular and summary reports. For joined reports, export is not available, and the printable view displays a maximum of 20,000 rows.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:17 PM in reply to: How to disable Quick Text in Salesforce Classic after enabling it?

    Quick Text Considerations -

     

    General Considerations

    • Editing the page layout for quick text changes the layout in both Salesforce Classic and Lightning Experience.
    • Quick text works with leads. However, when you convert a lead, you must use quick text on the converted accounts, contacts, and opportunities.
    • Administrators can customize the names of quick text channels, but we recommend that you don’t. Renaming standard values can prevent quick text messages from being available in the correct channels.

    Salesforce Classic Considerations

    • Subcategories are available only in Salesforce Classic.
    • The Share button for individual quick text records is available only in Salesforce Classic.
  • shariq

    Member
    September 19, 2018 at 9:15 PM in reply to: How to disable Quick Text in Salesforce Classic after enabling it?

    Hi,

    You cannot disable the feature altogether once enabled. But, you can remove all quick text records and remove CRUD access to the object via profiles. This should effectively disable its use in your organization.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:14 PM in reply to: How to insert Quick Text in Salesforce Lightning?

    Hi,

    Steps to Insert Quick Text In Salesforce

    • Turn on Quick Text. Following are the steps to enable quick text in your salesforce org:
      • Go to setup, enter Quick Text Settings in the Quick Find box, then select Quick Text Settings.
      • Click Enable Quick text.Remember once quick text is enabled it can’t be turn off.
      • Click save.
      • Create a Quick Text Message. Following are the steps to create quick text message :Go to Service
      • from the App menu and Click the Quick Text tab.
      • Click New.
      • If you have more than one Quick Text record type, you need to select a record type for the new message and then click Continue.
      • Type a message name. Let’s name our quick text Return Policy.
      • Type the message. Let’s enter the message: “Thanks for inquiring about our return policy. You may return items for any reason within 60 days of purchase. You must show a receipt to receive cash back for the return. If you don’t have a receipt, we’ll issue you a merchandise credit.”
      • Your quick text messages can include line breaks, lists, and special characters and can be up to 4,096 characters.
      • You can use the Merge Field Selector to insert merge fields into the quick text message.
      • Select the channels in which you want the message to be available.
      • Click Save
      • Inserting Quick text .Let’s insert quick text in an email reply. Following are the steps to insert
      • Quick text :In the Service Console, open a case. Click the Feed tab to see the Case Feed.
      • Click Email to write a reply email to the customer.
      • Enter ;; in the email message field. Available quick text messages are shown.
      • Select the quick text message that you want to use.
      • Click Enter.The quick text appears in the email. You can add to it or send it off as is.
      • Click Send to send the email.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:08 PM in reply to: What is the difference between a Role and Profile in Salesforce?

    Hi,

    Roles are one of the ways you can control access to records. They also impact reports (e.g. "My Teams" filter). Roles come into play if your security model (OWDs) are set to private.

    Profiles help determine record privileges. Assuming the User can see the record, Profiles determine what the User can do, view or edit on that record. Profiles control other system privileges as well (mass email, export data, etc)

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:07 PM in reply to: How to get global picklist value set in a Salesforce Visualforce page?

    Hi,

    Note - It's also good to keep in mind that global picklists are still in an 'open pilot'. Until the open beta begins (looks to be currently planned for Summer '16/ API v37), you'll need to have support activate the feature in production orgs if you want to use (in production) what you're working on.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:04 PM in reply to: Why we use Javascript Remoting & Remote OBject?

    Hi,

    Visualforce Remote Objects:

    • Makes basic “CRUD” object access easy
    • Doesn’t require any Apex code
    • Supports minimal server-side application logic
    • Doesn’t provide automatic relationship traversals; you must look up related objects yourself.

    JavaScript Remoting:

    • Requires both JavaScript and Apex code
    • Supports complex server-side application logic
    • Handles complex object relationships better
    • Uses network connections (even) more efficiently

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 9:03 PM in reply to: Which one to use and why - JavaScript Remoting and Remote Objects?

    Hi,

    Well, here are few advantages of “Visualforce Remote Objects” :

    1. No need to write Controllers, Everything can be done in Visualforce only.
    2. As @RemoteAction annotated methods needs to be static so you had to take special precaution as it didn’t
    3. supported Viewstate. This hurdle is completely removed now.
    4. No need to write Test Class now, as no Controller is involved.

    Hope this helps.

  • Hi,

    You can use external ID fields as foreign keys to create parent and child records of different sObject types in a single step instead of creating the parent record first, querying its ID, and then creating the child record. To do this:Create the child sObject and populate its required fields, and optionally other fields.
    Create the parent reference sObject used only for setting the parent foreign key reference on the child sObject. This sObject has only the external ID field defined and no other fields set.
    Set the foreign key field of the child sObject to the parent reference sObject you just created.
    Create another parent sObject to be passed to the insert statement. This sObject must have the required fields (and optionally other fields) set in addition to the external ID field.
    Call insert by passing it an array of sObjects to create. The parent sObject must precede the child sObject in the array, that is, the array index of the parent must be lower than the child’s index.

    Hope this helps.

  • shariq

    Member
    September 19, 2018 at 5:54 PM in reply to: How to connect my org to Salesforce marketing cloud?

    Hi Parul,

    I found this online -

    Before installing Marketing Cloud Connect, you need to keep the following Things in your mind –

    Review the Features page to understand compatibility and product versions.
    Marketing Cloud Connect requires a relationship between a single Marketing Cloud account and one or more Salesforce Org. Your Marketing Cloud account must be provisioned and enabled for use with Marketing cloud Connect prior to connection.
    Subscriber Key is required for Marketing Cloud Connect. If it is not enabled in your Marketing Cloud account, complete a Subscriber Key Migration before proceeding with the connection process.
    Ensure four custom tabs are available in your Salesforce org
    Salesforce users must have a license for the Marketing Cloud and a license for Salesforce CRM, for example, the Sales Cloud, to leverage most out of Marketing Cloud Connect functionality.
    User Types and Permissions –
    Install Marketing cloud – Paste the following URL for installing the marketing cloud package.Production org – https://login.salesforce.com/packaging/installPackage.apexp?p0=04t0H000000ggVV
    Sandbox org –https://test.salesforce.com/packaging/installPackage.apexp?p0=04t0H000000ggVV
    After login, select install for admin only, all users, or specific profiles.
    Click Install.
    Click Continue.
    After installing following permissions are used –
    Click on Setup ——-> Click Customize —-> Click users —–> Click Page Layouts—–> Edit the user page layout.
    Add the Marketing Cloud for AppExchange User field.
    Add the Marketing Cloud for AppExchange Admin field Click on Save button.
    Click on Setup —–> Click Manage Users ——–> Click Users ——–> Edit the Salesforce CRM administrator user.
    Enable Marketing Cloud for AppExchange User. Enable Marketing Cloud for AppExchange Admin.
    Click on save
    Setup salesforce system users –
    Click on Setup —–> click Manage Users—-> Click Users
    Create a new user or update an existing user with the following settings:-User License – Salesforce
    Profile – System Administrator
    Click on Save button.
    Edit the Salesforce system user.
    Ensure the user has the System Administrator profile applied.
    Check the Marketing Cloud for AppExchange Admin checkbox.
    Check the Marketing Cloud for Appexchange User checkbox.
    Click on save button.
    Steps to Login to Marketing cloud org –
    Navigate to Email Studio —> Click Admin ——> Click Salesforce Integration —–> Click Edit.
    Select Scope by User if applicable for your data access configuration.
    If prompted, click Upgrade to Connected App ——->Click Connect Account.
    if you are not logged in to the Sales or Service Cloud as your Salesforce system user in a separate tab, you are prompted to log in.
    Click OK and log in as the system user.
    Steps to create a Marketing cloud user API-
    Click on Email Studio—–> Click Admin ——> Click My Users —-> Click Create Name the user so it can be easily identified (eg. API-user-1234).
    Enter your email address as the Reply Email and Notification Email Addresses.
    Enter a unique username.
    Leave the External ID field blank, unless required by your organization.
    Set a Time Zone.
    Set a Culture Code.
    Check the API User checkbox.
    Create a temporary password.
    If you are using a non-enterprise 2.0 account, set the following roles and permissions on this page:User Permissions: NONE
    Marketing Cloud Permissions and Roles: NONE
    Select Email Application Select Mobile Connect (if applicable)
    Select Marketing Cloud Administrator role.
    Save the new Marketing Cloud API user.
    If you are using an enterprise 2.0 account, continue to set roles and permissions as follows-Click My Users from Email Studio Admin
    Select the Marketing Cloud API User
    Click Manage Roles
    Click Edit Roles and Assign the following roles: Marketing Cloud Administrator
    Save the roles for the Marketing Cloud API user
    Connecting the Marketing cloud API User –
    Click on Email Studio —-> Click Admin —–> Click My Users —-> Select the API user.
    Click Integrate for Salesforce.com Status —–>Enter the Salesforce system user username —–>Save the settings.
    The Salesforce.com Status field updates to “Integrated” if the connection is successful.
    Steps to Assign a Business Unit –
    In the Marketing Cloud, navigate to Email Studio.
    Click Admin —-> Click My Users —-> Select the Marketing Cloud API User.
    Click Manage Business Units at the top of the Users table.
    Ensure the selection under Default Business Unit is the top-level business unit.
    In the Associated Business Units section, select all business units to be used with Marketing Cloud Connect.
    Save the changes to the Marketing Cloud API User.
    Log in to your Salesforce org Again –
    Click Setup —-> Click Manage Apps —–> Connected Apps —–> Salesforce Marketing Cloud.
    Click on Edit Policies —–> Under Permitted Users, select Admin approved users are pre-authorized.
    If a warning message appears, click OK.
    Under IP Relaxation, select Relax IP restrictions.
    Under Refresh Token Policy, select Immediately expire refresh token.
    Save changes.
    Click on Setup —–> Click Manage Users —–> Click Permission Sets
    Click New —-> Give the permission set a memorable name. For example, Marketing Cloud Connected App.
    Validate the generated API name and ensure this field has the desired value. Save the permission set.
    Again Click on Setup —-> Click Manage Users —-> Click Permission Sets.
    Click the name of the newly created permission —-> Click Manage Assignments —-> Click Add Assignments
    Select the users who need to access the connected app.This typically matches the users that access Marketing Cloud Connect.
    Ensure the Salesforce system user is selected for access—>Click Assign—> Click done
    In Sales and Service cloud –
    Click Setup —-> Click Manage App —-> Connected Apps —-> Salesforce Marketing Cloud —-> Manage Permission Sets.
    Select the newly created permission set.
    Save changes.
    Click on Marketing Cloud tab.If you are using a Marketing Cloud Production Support environment, Click Advanced Settings and select Sandbox from the Marketing Cloud Environment list.
    Click Connect to Marketing Cloud.
    Enter the username and password for the Marketing Cloud Connect API User.
    Click Login.

    Hope this helps.

Page 29 of 57