Forum Replies Created

Viewing 20 posts - 1 through 20 (of 51 total)
  • #57536
    Forcetalks

    Lead Assignment Rules – An assignment rule dictates to users or queues is assigned based on criteria that are specified within Salesforce. Lead they are created manually, captured from the web, or imported via the lead import wizards.

    To set up a lead assignment rule, navigate to Set Up -> Build -> Leads -> Assignment Rules, and click “New.” Enter a descriptive Rule Name, check “Active,” and click “Save.”

    VIEW CONVERSATION
    #57535
    Forcetalks

    No a custom and standard controller cannot be referenced on the same page. A custom and standard controller should not be supported at the same time; another way is you can use extensions instead of Custom Controller.

    Ex- <apex:page standardcontroller=”” extensions=”controller name”/>

     

    VIEW CONVERSATION
    #56418
    Forcetalks

    Lightning Data Services (LDS) is a new mechanism in Salesforce that was proposed in winter 2017 to edit, delete, or update records in Lightning Components. LDS reduces the need for APEX methods and improves the overall performance and user-interface consistency. With the help of simple mark-ups, records and the related fields can be quickly loaded to the Lightning Component. In this way, LDS could be taken as a strong consideration before you start with next component development. This can be definitely be taken as the big deal for the future projects.

    VIEW CONVERSATION
    #55238
    Forcetalks

    Salesforce is based on the MVC architecture that has three components – Model – View – Controller. MVC is a software architecture pattern that separates the information representation from the users’ interaction with it. Salesforce is based on traditional MVC paradigm where interaction with the database is easier than your expectations and secure too.

    Model show what schema is used to represent the system completely?

    View layer shows how the schema is represented?

    Controllers are used to performing actions whenever the user interacts.

    VIEW CONVERSATION
    #55237
    Forcetalks

    There are four different types of sandboxes in the Salesforce like Developer Sandbox, Developer Pro Sandbox, Partial Copy Sandbox, and the Full Sandbox etc. Each sandbox has different objectives and purposed based on developer needs and requirements. They are mostly needed to develop or test an application in an isolated environment and making it highly suitable for use.

    VIEW CONVERSATION
    #54977
    Forcetalks

    Enqueue action refers to the server-side controller activity to the line of activities to be executed. All activities that are enqueued will keep running toward the finish of the event loop. As opposed to sending a different demand for every individual action, the system forms the occasion chain and groups the activities in the line into one demand. The activities are asynchronous and have callbacks.

    App hostile is the situation that occurs when the callbacks in the enqueue loop are hindered due to a faulty code or asynchronous instruction.

    VIEW CONVERSATION
    #54976
    Forcetalks

    A sandbox can be a test territory where you put the dubious code to give it a shot before placing it into the final execution streams. It can likewise be a security component that places programs in their very own zone where they can’t influence other running projects. Whereas, a development environment is nothing but a collection of stuff that you are going to use to compose the code and produce a related software.

    VIEW CONVERSATION
    #54741
    Forcetalks

    Try this code:

    VIEW CONVERSATION
    #54156
    Forcetalks

    1. “before” triggers to validate data or update fields on the same record being triggered.

    2. “after” triggers to update parent or related records

    3. “insert” for events that occur on record creation

    4. “update” for events on existing records

    BEFORE trigger

    1. BEFORE triggers are usually used when validation needs to take place before accepting the change. They run before any change is made to the database.

    2. In case of validation check in the same object.

    3. Insert or update the same object.

    AFTER trigger

    1. AFTER triggers are usually used when information needs to be updated in a separate table due to a change.

    2. They run after changes have been made to the database (not necessarily committed).

    3. Insert/Update related object, not the same object.

    4. Notification email.

    5. We cannot use After trigger if we want to update a record because it causes read-only error. This is because after inserting or updating, we cannot update a record.

    VIEW CONVERSATION
    #54155
    Forcetalks

    Apex class
    public class ScemaMultiDisplayEx {
    public list<selectOption>notSelectedOption{set;get;}
    public list<selectOption>SelectedOption{set;get;}
    public list<selectOption>SelecteObject {set;get;}
    public set<string>NotSelectedFields{set;get;}
    public set<string>SelectedFields{set;get;}
    public list<string>FieldNames{set;get;}
    Public list<string>nonSelected{set;get;}
    Public list<string>Selected{set;get;}
    public map<string,schema.SObjectType>ObjectMap {set;get;}
    public map<string,schema.SObjectField>fieldMap {set;get;}
    public list<Sobject>result {set;get;}
    public string SelectedObject {set;get;}
    public ScemaMultiDisplayEx(){
    ObjectMap= new map<string,schema.SObjectType>();
    notSelectedOption= new list<selectOption>();
    SelectedOption= new list<selectOption>();
    SelecteObject=new list<selectOption>();
    NotSelectedFields= new set<string>();
    SelectedFields = new set<string>();
    Selected= new list<string>();
    nonSelected= new list<string>();
    ObjectMap=schema.getGlobalDescribe();
    fieldMap=new map<string,schema.SObjectField>();
    selectOption op = new selectOption(‘None’,’-None-‘);
    SelecteObject.add(op);
    notSelectedOption.add(op);
    SelectedOption.add(op);
    for(string s:ObjectMap.keySet()){
    selectOption op1= new selectOption(s,s);
    SelecteObject.add(op1);
    }
    }
    public void getOption(){
    schema.SObjectType obj = ObjectMap.get(SelectedObject);
    schema.DescribeSObjectResult res=obj.getDescribe();
    FieldMap=res.Fields.getMap();
    NotSelectedFields.addAll(fieldMap.keyset());
    getValue();
    //system.debug(NotSelectedFields);
    }
    public void getValue(){
    notSelectedOption.clear();
    SelectedOption.clear();
    Selectoption op= new selectoption(‘None’,’-None-‘);
    if(NotSelectedFields.size()>0){
    for(string ss: NotSelectedFields){
    selectoption p1= new selectoption(ss,ss);
    notSelectedOption.add(p1);
    }
    }else{
    notSelectedOption.add(op);
    }
    if(SelectedFields.size()>0){
    for(string s:SelectedFields){
    selectoption p= new selectoption(s,s);
    SelectedOption.add(p);
    }
    }else{
    SelectedOption.add(op);
    }
    }
    public void AddRecords(){
    NotSelectedFields.removeAll(Selected);
    SelectedFields.addAll(Selected);
    getValue();
    }
    public void RemoveRecord(){
    SelectedFields.removeAll(nonSelected);
    NotSelectedFields.addAll(nonSelected);
    getValue();
    }
    }
    Visulforce page
    <apex:page controller=”ScemaMultiDisplayEx” showHeader=”false” >
    <style>
    .b{
    width:200px;
    height:200px;
    color:Blue;
    }
    </style>
    <apex:form >
    <apex:pageBlock >
    Choose a Object <apex:selectList size=”1″ value=”{!SelectedObject}”>
    <apex:selectOptions value=”{!SelecteObject}”/>
    <apex:actionSupport event=”onchange” action=”{!getOption}” reRender=”one” />
    </apex:selectList>
    <apex:panelGrid columns=”3″ id=”one”>
    <apex:selectList multiselect=”true” value=”{!Selected}” styleClass=”b”>
    <apex:selectOptions value=”{!notSelectedOption}”/>
    </apex:selectList>
    <apex:panelGrid columns=”1″>
    <apex:commandButton value=”ADD” action=”{!AddRecords}” reRender=”one” />
    <apex:commandButton value=”DEL” action=”{!RemoveRecord}” reRender=”one” />
    </apex:panelGrid>
    <apex:selectList multiselect=”true” value=”{!nonSelected}” styleClass=”b” >
    <apex:selectOptions value=”{!soption}”/>
    </apex:selectList>
    </apex:panelGrid>
    </apex:pageBlock>
    <apex:pageBlock title=”Records” rendered=”{! !Isnull(result)}”>
    <apex:pageBlockTable value=”{!result}” var=”a”>
    <apex:repeat value=”{!FieldNames}” var=”b”>
    <apex:column value=”{!a[b]}” />
    </apex:repeat>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
    </apex:page>

    VIEW CONVERSATION
    #53951
    Forcetalks

    Here is the code, you can use:

    Apex class

    public class ContactSearch {

    @AuraEnabled

    public static list<string>getAccount(){

    list<string>options= new list<string>();

    for(contact acc:[select name from Contact]){

    options.add(acc.name);

    system.debug(‘options name values’+options);

    }

    return options;

    }

    }

    Cmp

    <aura:component controller=”ContactSearch “>

    <!–start attributes here–>

    <aura:attribute name=”selectedOptions” type=”string”/>

    <aura:attribute name=”listOfOptions” type=”string[]”/>

    <aura:attribute name=”filteredOptions” type=”string[]”/>

    <aura:attribute name=”searchLookup” type=”string”/>

    <aura:attribute name=”searchKey” type=”string”/>

    <aura:attribute name=”placeholder” type=”string”/>

    <aura:attribute name=”actionMethod” type=”string”/>

    <aura:handler name=”init” value=”{!this}” action=”{!c.myAction}”/>

    <!– clse attributes here–>

    Conatct Search {!v.listOfOptions}

    <div class=”slds-form-element”>

    <div class=”slds-form-element__control”>

    <div class=”slds-combobox_container slds-has-inline-listbox”>

    <div class=”slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-combobox-lookup”

    aria-expanded=”false”

    aria-haspopup=”listbox”

    role=”combobox”

    aura:id=”searchLookup”>

    <div class=”slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right” >

    <ui:inputText updateOn=”keyup”

    keyup=”{!c.keypress}”

    class=”slds-input slds-combobox__input”

    value=”{!v.searchKey}” />

    <aura:if isTrue=”{!empty(v.selectedOptions)}”>

    <span class=”slds-icon_container slds-icon-utility-search slds-input__icon slds-input__icon_right”

    title=”Description of icon when needed”>

    <lightning:icon iconName=”utility:search” size=”small” variant=”brand”/>

    <span class=”slds-assistive-text”>Description of icon</span>

    </span>

    <aura:set attribute=”else”>

    <button class=”slds-button slds-button_icon slds-input__icon slds-input__icon_right”

    onclick=”{!c.clear}”>

    <lightning:icon iconName=”utility:close” size=”small”/>

     

    <span class=”slds-assistive-text”>Remove selected option</span>

    </button>

    </aura:set>

    </aura:if>

    </div>

    <div id=”listbox-unique-id” role=”listbox”>

    <ul class=”slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid”

    role=”presentation”>

    <aura:iteration items=”{!v.filteredOptions}” var=”option”>

    <li role=”presentation”

    class=”slds-listbox__item”

    onclick=”{!c.selectOption}”

    data-record=”{!option}”>

    <span id=”listbox-option-unique-id-01″

    class=”slds-media slds-listbox__option slds-listbox__option_entity slds-listbox__option_has-meta”

    role=”option”>

    <span class=”slds-media__body”>

    <span class=”slds-listbox__option-text slds-listbox__option-text_entity”>{!option}</span>

    </span>

    </span>

    </li>

    </aura:iteration>

    </ul>

    </div>

    </div>

    </div>

    </div>

    </div>

    </aura:component>

     

    Controller.js
    ({
    myAction : function(component, event, helper) {
    helper.helperMethod(component);
    },
    keypress:function(component,event,helper){
    var searchKey= component.get(“v.searchKey”);
    //alert(‘serach key value’+searchKey);
    var searchLookup=component.get(“v.searchLookup”);
    // alert(‘serach’+searchLookup);
    var searchLookup=component.find(“searchLookup”);
    // alert(‘search key value is ‘+searchLookup);
    if(searchKey.length>0){
    $A.util.addClass(searchLookup,’slds-is-open’);
    $A.util.removeClass(searchLookup,’slds-combobox-lookup’);
    var options=component.get(“v.listOfOptions”);
    var filteredOptions=options.filter(function (el){
    return el.toLowerCase().indexOf(searchKey.toLowerCase())>-1;
    });
    component.set(“v.filteredOptions”,filteredOptions);
    }else{

    $A.util.addClass(searchLookup,’slds-combobox-lookup’);
    $A.util.removeClass(searchLookup,’slds-is-open’);
    }
    },
    clear: function (component, event, heplper) {
    var searchLookup = component.find(“searchLookup”);
    $A.util.addClass(searchLookup, ‘slds-combobox-lookup’);
    component.set(“v.selectedOptions”, null);
    component.set(“v.searchKey”, null);
    },
    selectOption: function (component, event, helper) {
    var selectedItem = event.currentTarget.dataset.record;
    alert(‘selected value is’+selectedItem);
    component.set(“v.selectedOptions”, selectedItem);
    var searchLookup = component.find(“searchLookup”);
    $A.util.removeClass(searchLookup, ‘slds-is-open’);
    component.set(“v.searchKey”, selectedItem);

    }
    })
    Helper.js
    ({
    helperMethod : function(component){
    var actionMethod = component.get(“v.actionMethod”);
    var action = component.get(“c.getAccount”);
    action.setCallback(this, function (response) {
    var state = response.getState();
    if (state === “SUCCESS”) {
    var options = response.getReturnValue();
    // alert(‘Returned values’+response.getReturnValue());
    //console.log(options);
    component.set(“v.listOfOptions”, options);
    }
    });
    $A.enqueueAction(action);
    },
    })
    Application
    <aura:application extends=”force:slds” >
    <c:ComponentName/>
    </aura:application>

    VIEW CONVERSATION
    #53664
    Forcetalks

    In salesforce junction object is a custom object which uses one instance of a record to many child records. A custom object with two master-detail relationships. Using a custom junction object, you can model a “many-to-many” relationship between two objects. For example, you may have a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs.

    VIEW CONVERSATION
    #53663
    Forcetalks

    Salesforce can create skinny tables to contain frequently used fields and to avoid joins. This can improve the performance of certain read-only operations. Skinny tables are kept in sync with their source tables when the source tables are modified.

    Skinny tables can be created on custom objects, and on Account, Contact, Opportunity, Lead, and Case objects. They can enhance performance for reports, list views, and SOQL.

    Skinny tables can contain the following types of fields.

    · Checkbox

    · Date

    · Date and time

    · Email

    · Number

    · Percent

    · Phone

    · Picklist (multi-select)

    · Text

    · Text area

    · Text area (long)

    · URL

    Considerations

    · Skinny tables can contain a maximum of 100 columns.

    · Skinny tables can’t contain fields from other objects.

    · For Full sandboxes: Skinny tables are copied to your Full sandbox orgs.

    For other types of sandboxes: Skinny tables aren’t copied to your sandbox organizations. To have production skinny tables activated for sandbox types other than Full sandboxes, contact Salesforce Customer Support.

    VIEW CONVERSATION
    #53661
    Forcetalks

    Below Fields that are automatically indexed in Salesforce are:

    · Name

    · CreatedDate

    · Systemmodstamp (LastModifiedDate)

    RecordTypeId
    RecordOwner
    Relationships (lookups and master-detail)
    Custom fields marked as External ID or Unique.

    VIEW CONVERSATION
    #53386
    Forcetalks

    Here is step by step process for Salesforce MailChimp integration through an app.

    Firstly, install and configure the app in Salesforce. The app is quickly available at the Salesforce AppExchange for download.

    Once you have installed the app successfully, the next step is to define MailChimp sections to your content layouts. For this purpose, go to the Setup -> leads/Contacts -> Fields -> Layouts.

    In the Layout, you can see the VisualForce page. Simply drag and drop the Membership Contact section to the layout created by the MailChimp app you installed currently.

    For professional or unlimited editions, you can also add MC fields in the layout designer section. You have the flexibility to change the fields in the Layout Designer section.

    Don’t forget to save the changes at each step.

    Reference – https://www.janbask.com/blog/mailchimp-and-salesforce-integration/

    VIEW CONVERSATION
    #53203
    Forcetalks

    Community Cloud is a social stage of the Salesforce.com that is intended to associate and encourage correspondence among an association’s representatives, accomplices and clients

    Whereas sites in Salesforce empowers you to make open sites and applications that are straightforwardly coordinated with your Salesforce association—without expecting clients to sign in with a username and secret key. You can freely uncover any data which has been put away in your association through a marked URL of your choice.

    VIEW CONVERSATION
    #53202
    Forcetalks

    Salesforce testing is not a very easy thing to do. You can create apps without codes but when it comes to testing you need a substantial amount of coding skills. Here are 6 practical tips for testing in Salesforce-

    · Focus on Code Portability
    · Be mindful about your Code’s coverage
    · Always write your Test Case in Controllers and Classes
    · Perform Assert Based Testing
    · Always do the Testing for Bulk data first

    VIEW CONVERSATION
    #53191
    Forcetalks

    Macros automate a progression of tedious keystrokes that help the specialists in making the Salesforce Console for Service. You can rapidly total monotonous errands, for example, refreshing the case status, by running a full-scale check of all activities. You can oversee Macros in Salesforce Classic. Salesforce Macros gives you a chance to accelerate the undertakings, for example, choosing the correct email layouts, computerizing customary assignments and so forth, with the goal that operators can invest their energy in accomplishing more essential things.

    VIEW CONVERSATION
    #53161
    Forcetalks

    Represents a record that has been transferred to a library in Salesforce CRM Content or Salesforce Files. This object is accessible in renditions 17.0 and later for Salesforce CRM Content. This object is accessible in API variant 21.0 and later for Salesforce Files.

    The greatest number of archives that can be distributed is 30,000,000. For this reason, the filed documents check toward this limit and toward capacity use limits as well.

    VIEW CONVERSATION
    #53160
    Forcetalks

    Lightning Locker uses various technologies and techniques to make Lightning Components secure. It is powerful security architecture for Lightning components. Locker Service enhances security by isolating Lightning components that belong to one namespace from components in a different namespace. Locker Service also promotes best practices that improve the supportability of your code by only allowing access to supported APIs and eliminating access to non-published framework internals.

    At a high level, Lightning Locker uses various technologies and techniques that are intended to do the following:

    Prevent:

    · Components from causing XSS and similar security issues

    · Components from reading other component’s rendered data without any restrictions

    · Components from calling undocumented/private APIs

    Enable:

    · Cool new features like client-side API versioning similar to REST API versioning*

    · Faster security review

    · Better and more secure JS development practices

    · Running 3rd party JS frameworks like React, Angular and so on*

    · Easily adding or removing new security features and policies’

    VIEW CONVERSATION
Viewing 20 posts - 1 through 20 (of 51 total)