Forum Replies Created

Page 10 of 10
  • Piyush

    Member
    August 14, 2019 at 2:33 am in reply to: How can I add an action region to the select radio?

    Hi Tanu,

    I am referring a code this will  definitely help you:-

    <apex:pageBlockSection title="Add New Account">
    <apex:inputField value="{!acc.Name}"/>
    <apex:inputField value="{!acc.Website}"/>
    <apex:inputField value="{!acc.Phone}"/>
    <apex:actionRegion>
    <apex:selectRadio value="{!kind}">
    <apex:selectOptions value="{!choice}"/>
    <apex:actionSupport event="onchange" reRender="up" action="{!change}"/> <!-- Change will work here -->
    </apex:selectRadio>
    </apex:actionRegion>
    <apex:selectRadio id="up" value="{!fooditem}">
    <apex:selectOptions value="{!offer}"/>
    </apex:selectRadio>
    </apex:pageBlockSection>

  • Piyush

    Member
    August 14, 2019 at 2:28 am in reply to: How can salesforce AppExchange benefit our company?

    Hi Prachi,

    The two main benefits of using AppExchange products are:

    1. You don’t have to build any functionality from scratch. You can just download a pre-built solution, which is more secure and already tested by other users.
    2. You don’t have to invest development and maintenance costs, as paid apps are often improved and enhanced by their providers. There’s only the time investment of searching for an existing app and implementing it, either yourself or with the help of an expert.
  • Piyush

    Member
    August 13, 2019 at 3:59 am in reply to: How to Hide Column Label in Salesforce Lightning Datatable?

    Hi Deepak,

    You need to filter the column to hide Column Label Lightning Datatable:-

    Let if i want to hide the phone column then use below code-

    ({
    init: function (cmp, event, helper) {
    let columns = [
    { label: 'Phone', fieldName: 'Phone', type: 'phone'},
    ];
    let mycolumns = columns.filter(col => col.label !== 'Phone');
    cmp.set('v.mycolumns',mycolumns);
    helper.getData(cmp);
    }
    })

    Thanks

    Piyush

  • Hi Deepak,

    Try this code to get an attribute from one component to another component:-

    //First component

    <aura:component>
    <aura:attribute name=”recordId” type=”Id” />
    
    <aura:handler name=”init” value=”{!this}” action=”{!c.doInit}” />
    <aura:attribute name=”wrappers” type=”ListeArticlesWrapper” />
    <aura:attribute name=”articles” type=”Article__c” />
    
    <aura:attribute name=”Detail” type=”String”/>
    <aura:registerEvent name=”navigate” type=”c:NavigateToDetail”/>
    
    <div class=”page”>
    <h1>Liste des articles</h1>
    <div class=”slds”>
    <table class=”slds-table slds-table–bordered slds-table–cell-buffer”>
    <thead>
    <tr class=”slds-text-heading–label”>
    <th scope=”col” class=”head”></th>
    <th scope=”col” class=”head”>Nom</th>
    <th scope=”col” class=”head”>Type</th>
    <th scope=”col” class=”head”>Prix</th>
    <th scope=”col” class=”head”></th>
    </tr>
    </thead>
    <tbody>
    <aura:iteration items=”{!v.wrappers}” var=”wrap”>
    <tr>
    <td class=”cell”>
    <ui:inputCheckbox value=”{!wrap.selected}” />
    </td>
    <td class=”cell”>
    <ui:outputText value=”{!wrap.art.Name}” />
    </td>
    <td class=”cell”>
    <ui:outputText value=”{!wrap.art.Type__c}” />
    </td>
    <td class=”cell”>
    <ui:outputText value=”{!wrap.art.Prix__c}” />
    </td>
    <td class=”cell”>
    <button class=”slds-button slds-button–neutral slds-not-selected”
    onclick=”{!c.getDetail}” data-recId=”{!wrap.art.Id}”>Details</button>
    </td>
    </tr>
    </aura:iteration>
    </tbody>
    </table>
    </aura:component>

    //Controller of this component

    doInit : function(component, event, helper) 
    {
    helper.init(component, event);
    },
    getArticles : function(component, event, helper) 
    {
    helper.getArticles(component, event);
    },
    getDetail : function(component, event, helper)
    {
    var id = event.target.getAttribute("data-recId");
    var article = component.get("v.articles");
    var evt = $A.get("e.c:NavigateToDetail");
    evt.setParams({"detail": article});evt.fire();
    }

    Just like create the second component.

    Thanks

    Piyush

  • Hi Deepak,

    Apex doesn't allow multiline string literals, So you need to quote that JSON line by line, and add new lines via 'n':-

    request.setBody('{ n' +
    ' "Fields" : [{ n'+
    ' "Field" : "Name",n' +
    ' "Data" : "Palo Alto Networks"n'+
    ' }n'+
    ' ] n'+
    ' } n'
    );

  • Hi Yogesh,

    Use  <apex:inputCheckbox value="{!someBool}">a checkbox?</apex:inputCheckbox> in your visualforce page and use

    public boolean someBool {get; set;} in your controller.

  • Piyush

    Member
    August 12, 2019 at 4:30 am in reply to: How do we create a popup from VF page?

    Hi Yogesh,

    I am refering an example for popup window:-

    <apex:pageBlock >
    <apex:commandButton value="show popup" action="{!showPopup}" rerender="popup" status="status"/><apex:outputPanel id="popup">

    <apex:outputPanel id="popInnerOutputPnl" styleClass="customPopup" layout="block" rendered="{!displayPopUp}">
    <apex:commandButton value="X" title="Close the popup" action="{!closePopup}" styleClass="closeButton" rerender="popup">
    </apex:commandButton>
    <apex:pageblockSection >

    <apex:pageblockSectionItem >
    <apex:outputLabel value="Email" for="address"></apex:outputLabel>
    <apex:inputField id="address" value="{!Contact.Email}"/>
    </apex:pageblockSectionItem>
    </apex:pageblockSection>
    <apex:commandButton value="Ok" action="{!redirectPopup}" styleClass="closeButton" rerender="popup">
    </apex:commandButton>
    </apex:outputPanel>
    </apex:outputPanel>

    </apex:pageBlock>

  • Piyush

    Member
    August 12, 2019 at 4:20 am in reply to: How will we identify ESB is needed in a project in Salesforce?

    Hi Gursimran,

    When To use ESB:-

    • When system integration points grow beyond two, with additional integration requirements.
    • When using multiple protocols such as FTP, HTTP, Web Service, and JMS etc.
    • When there is a requirement for message routing based on message content and similar parameters.

     

  • Hi Somendra,

    I hope this will help you to differentiate between Process Builder or Apex Triggers.

    1-Process Builder – Pros:
    We recommend starting with Process Builder, especially for processes that can be simplified to if/then statements. Below are some ideal scenarios for using it:

    -Process Builder can do the following actions without Apex code:
    -Create records and set field values
    -Update related records
    -Create Chatter posts
    -Send an email
    -Create an approval
    -Simple triggers like populating a lookup field based on certain criteria can now be automated in Process Builder
    2-Launch an automated flow.
    3-Call an Apex class.

    Process Builder – Cons:
    Below are some limitations to using Process Builder and the advantages of using Apex triggers to address these particular scenarios:

    1. Process Builders cannot handle before DML It executes after a record has been created or updated. Whereas Apex triggers can handle both before and after DML operations.
    2. Process Builder cannot handle delete and undelete DML. Whereas Apex triggers can handle all DML operations.
    3.Validation: Processes do not trigger validation rules and can, therefore, invalidate data.
    An error reported in Process Builder is more generic which makes it difficult to find the origin of the error. With Apex triggers, exception handling can be made more specific.
    4. It is all or none in case of Process Builder failure. But with Apex triggers partial success is possible.
    5. Whenever a particular use case is not possible using Process Builder, consider using Apex triggers. For example, consider the below use case:-
    A custom field on a Parent object which is based on the field related to the max (roll-up) among the child records. Since roll-up functionality involves insert, update, delete and undelete operations, using an Apex trigger is the best option in this scenario.

  • Piyush

    Member
    August 9, 2019 at 5:53 am in reply to: What is the purpose of Auth namespace in Salesforce?

    Hi Somendra,

    The Auth namespace has an interface and classes which allows single sign-on into Salesforce. This also support session security management.

  • Piyush

    Member
    August 9, 2019 at 2:37 am in reply to: javascript remoting requests

    Hi Somendra,

    Configure a remoting request by providing an object with configuration settings when you declare the remoting request.
    For example, the default configuration parameters look like this:1
    { buffer: true, escape: true, timeout: 30000 }
    These configuration parameters aren’t ordered, and you can omit parameters you don’t want to change from the default.
    JavaScript remoting supports the following configuration parameters:

    1.  buffer (Boolean):-Whether to group requests executed close to each other in time into a single request. The default is true.JavaScript remoting optimizes requests that are executed close to each other in time and groups the calls into a single request. This buffering improve the efficiency of the overall request-and-response cycle, but sometimes it’s useful to ensure all requests execute independently.
    2. escape(Boolean):-Whether to escape the Apex method’s response. The default is true.
    3. timeout(Integer):-The timeout for the request, in milliseconds. The default is 30,000 (30 seconds). The maximum is 120,000 (120 seconds, or 2 minutes).
  • Piyush

    Member
    August 8, 2019 at 10:18 am in reply to: How to Invoke Batch Class in Salesforce?

    Hi Achintya,

    We can use database.executebatch ( ) method to programmatically begin the batch job.

    Syntax:

    Public static ID execute batch ( sObject class name)

    Public static ID execute batch (sObject class name, integers scope)

    The above two methods are static methods of database class. We can use any one of the methods to execute the batch job.

  • Piyush

    Member
    August 8, 2019 at 9:16 am in reply to: What is Visibility Enum in Salesforce?

    Hi Achintya,

    Use the Cache.Visibility enumeration in the Cache.Session or Cache.Org methods to indicate whether a cached value is visible only in the value’s namespace or in all namespaces.

  • Piyush

    Member
    August 8, 2019 at 7:48 am in reply to: How to Remove a Duplicate CaseID Programatically in Salesforce?

    Hi,

    You can use trigger to delete the duplicate ids as follows:-

    Trigger deleteduplicate on Student__c (before insert)
    {
    set<String> uniqueIds = new set<Id>();

    for (Student__c s : Trigger.new)
    uniqueIds.add(s.StudentId__c);

    list<Student__c> existingstudents = [select StudentId__c from Student__c where StudentId__c in :uniqueIds];

    list<Student__c> dupestodelete = new list<Student__c>();
    for (Student__c s : Trigger.new)
    {
    for (Student__c existing : existingstudents)
    {
    if (s.StudentId__c == existing.StudentId__c)
    {
    dupestodelete.add(s);
    continue;
    }
    }
    }

    delete dupestodelete;

    }

  • Piyush

    Member
    August 8, 2019 at 4:19 am in reply to: How can we provide email validations in Salesforce?

    Hi,

    For the Email Validation in salesforce apex, you can use the regular expression as follow:-

    String emailRegex = '([a-zA-Z0-9_\-\.]+)@((\[a-z]{1,3}\.[a-z]{1,3}\.[a-z]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})';

  • Piyush

    Member
    August 8, 2019 at 3:55 am in reply to: Any one know about Textible.io- A native Salesforce.com SMS Tool

    In Textible.io app, you can send an SMS from Salesforce using ‘SMS ’ application in a very effective way. Sending SMS notifications to customers might be a boon for the business, resulting in a faster process comparative to the past.

    Salesforce doesn’t offer you any standard feature to send SMS, but you can transmit SMS notifications to Leads/Contacts, Accounts, and to the records in routine or custom objects. The follow-up of customers is made convenient by sending SMS notifications, taking the help of Cheapest Native SMS app that is easily available in Salesforce AppExchange.

  • Piyush

    Member
    August 7, 2019 at 7:39 am in reply to: How to send a email to campaign member in Salesforce MC?

    Follow these steps to send email to campaign member in salesforce marketing cloud:-

    1. In Marketing Cloud, navigate to Email Studio.
    2. Click Salesforce Send Emails under Interactions.
    3. Click Create.
    4. Enter a name and description for the email.
    5. Select an email to send.
    6. Select a send classification.
    7. Click Edit Recipients.
    8. Add campaign Members or data extensions to the Targeted recipient list.
    9. Select a campaign Member or data extension from the lookup window.
    10. Add Salesforce reports, campaign Member, or data extensions to the Exclusions list if needed.
    11. Save the recipients list.
    12. Save the Salesforce send definition. The Salesforce send definition is created.
    13. In Marketing Cloud, navigate to Email Studio.
    14. Click Salesforce Send Emails under Interactions.
    15. Select a Salesforce send definition.
    16. Click Send.
    17. Select the date and time to start the send.
    18. Certify that all recipients have opted to receive the email.
    19. Click Send.
  • Piyush

    Member
    August 7, 2019 at 5:16 am in reply to: Adding the "Options" Field for CPQ Products?

    For Adding the "Options" Field for CPQ Products you need to follow these steps:-

    1. Click Products in the navigation bar, then choose the All Products list view
    2. Click Copy Machine
    3. Click the Related tab
    4. In the Options related list, click New
    5. In the Optional SKU field, search for and select Copy Binding Module
    6. In the Number field, enter <Number>
    7. Check Selected
    8. In the Quantity field, enter <Quantity>
    9. Click Save
      You can use these steps to add other Optional SKU fields also.
  • For the  refresh  view, run  $A.get('e.force:refreshView').fire();, which will reload all data for the view.

    Example:-

    refresh : function(component, event, helper) {

    var action = component.get('c.myController');

    action.setCallback(component,

    function(response) {

    var state = response.getState();

    if (state === 'SUCCESS'){

    $A.get('e.force:refreshView').fire();

    } else {

    //do something

    }

    });

    $A.enqueueAction(action);

    }

  • Piyush

    Member
    August 5, 2019 at 11:37 am in reply to: Salesforce CRM vs. SAP CRM- Which One is Better?

    Both the SAP as well as the Salesforce CRM software is innovative and highly scalable. They are a high standard application based on SaaS technology. And as per Gartner’s report, both CRM have their own metrics and standards. Where the SAP CRM was an on-premise CRM a year back, that required software to be run, the Salesforce CRM, on the other hand, doesn’t require any such software. With regards to customer satisfaction, both the SAP as well as the Salesforce CRM scored 99 percent.

Page 10 of 10