Forum Replies Created

Page 3 of 8
  • Hi,

    Please check whether you have marked true or not to “Convert Text Attachments to Binary Attachments” in email service class . If it is not true please make it true after that you will be able to recive CSV attachment as well.

    Thanks

     

  • Aman

    Member
    May 31, 2018 at 8:08 am in reply to: How to use OR Condition in Salesforce Formula Field?

    Hi Parv,

    Try below condition

    if((Used__c < Purchased__c) || (Purchased__c = 0),FALSE,TRUE)

    Thanks

  • Aman

    Member
    May 31, 2018 at 8:06 am in reply to: Why Account Field is not populated in Email Template ?

    Hi Parv,

    To populate the Account Field in email template ,Please Make VisualForce Template.

    Thanks

  • Hi Parv,

    For VisualForce Template  ‘/{!relatedTo.id} doesn't work,here you can use this URL in your Value.

    <apex:outputLink value="{!LEFT($CurrentPage.URL,FIND('/',$CurrentPage.URL,9))+relatedTo.id}" target="_parent" >{!relatedTo.Name}</apex:outputLink>

    Hope this helps!

    Thanks

  • Aman

    Member
    May 31, 2018 at 8:00 am in reply to: Showing Null value in OwnerEmail

    Hi Parv,

    ‘Trigger.New’  only return data to single hierarchy.That's why you are getting null value in your case.For this first find out OwnerId then find Email of that based on it.

    for(Account acc : Trigger.New){

    String id = acc.OwnerId;

    }
    String email = [Select id,Email from User where id =: id].email;

    Thanks

  • Hi Parv,

    No, the Remainder Date Field is not available for Report.

    You may use a CustomFormulaField(i.e. Assign the Value of Reminder date to it).

    Thanks

  • Hi Parv,

    Suppose you have an instance of ContractLineItem is ‘contractLineItemObject’ and a instance Map(i.e. You mentioned) is ‘mapofProductCodevsAccountField’.

    Then use,

    if(mapofProductCodevsAccountField.containsKey(contractLineItemObject.ProductCode)

    {

    String str = mapofProductCodevsAccountField.get(contractLineItemObject.ProductCode);

    contractLineItemObject.Account(str,’Value you want to assign’);

    }

    Thanks

  • Aman

    Member
    May 31, 2018 at 7:52 am in reply to: Error while viewing Email Template in Salesforce Marketing Cloud

    Hi Parv,

    I think here you forgot to include "Profile Centre" in Email Template body.This "profile attribute" is mandatory while creating Email template in marketing cloud.

    Thanks

  • Aman

    Member
    May 31, 2018 at 7:49 am in reply to: How to parse XML String in Salesforce Apex Class?

    Hi Parv,

    As per your requirement,you can take the following string as reference
    XMLString = '<?xml version="1.0" encoding="UTF-8"?><products><product><name>Xbox</name><code>XBO</code></product><product><name>Playstation</name><code>PS</code></product><product><name>Wii</name></product></products>';
    You need to pass this String in the given Method.

    public XMLparse(String XMLString){

    pro = new list<Product2>();

    DOM.Document doc=new DOM.Document();

    try{

    doc.load(XMLString);

    DOM.XmlNode rootNode=doc.getRootElement();

    parseXML(rootNode);

    pro.add(temppro);

    insert pro;

    }catch(exception e){

    system.debug(e.getMessage());

    }

    }

     

    private void parseXML(DOM.XMLNode node) {

    if (node.getNodeType() == DOM.XMLNodeType.ELEMENT) {

    if(node.getName()=='product'){

    if(temppro!=null)

    pro.add(temppro);

    temppro = new product2();

    }

    if(node.getName()=='name')

    temppro.name=node.getText().trim();

    if(node.getName()=='code')

    temppro.productcode=node.getText().trim();

    }

    for (Dom.XMLNode child: node.getChildElements()) {

    parseXML(child);

    }

    }

    Thanks

  • Hi Parv,

    For this you can make a instance of Pricebook,and then assign id of Standard Pricebook to that.

    For this,Please do the following,

    Pricebook2 standardPricebook = new Pricebook2(

    Id = Test.getStandardPricebookId(),

    IsActive = true

    );

    //Execute an update DML on the Pricebook2 record, to make IsStandard to true

    Update standardPricebook;

    Thanks

  • Hi parv,

    set the Value of ‘setTreatTargetObjectAsRecipient’ as False.

    Messaging.SingleEmailMessage mail= new Messaging.SingleEmailMessage();

    setTreatTargetObjectAsRecipient(false);

    Hope this helps!

    Thanks

  • Hi Parv,

    For this you must Enable 'List' as a Setting Type option within the Custom Settings creation page‘,

    For this enter  ‘Schema Settings’ in the Quick Find/Search Box ,

    select Schema Settings under Data Management.

    Open Schema Settings and  ‘Enable List as a Setting Type option within the Custom Settings creation page’,then Activate the same.

    Thanks

  • Aman

    Member
    May 30, 2018 at 9:35 am in reply to: Editing a record from selecting list of record using radio button

    Hi Jay,

    There are two-three things that are missing in your code, first one is you have used apex:param but you haven't  assign the value for parameter to any variable of apex class. next is your are using Idvalue = ApexPages.currentPage().getParameters().get(‘id’); in your code, are you using this page of an sobject layout ?. next your are refrencing the page to another page, you haven't send the code for that page. please share the code for Page.ContactEditPage.

    Thanks

  • Aman

    Member
    May 30, 2018 at 9:20 am in reply to: Re-render issue with pageblock section for Contact

    Hi Raghav,

    You are re-rendering the complete form in the action:support instead of doing this re-render only the pageblock section for contact. Add an output panel for pageblock section for contact details and rerender its id in the action support then it will work fine.

    <input type="radio" name="group1" id="radio"> </input>
    <apex:actionSupport event="onclick" action="{!showContact}" reRender="rad">
    <apex:param assignTo="{!AccId}" name="accname" value="{!acc.account.id}"/>
    </apex:actionSupport>

    <apex:outputPanel id="rad">
    <apex:pageBlockSection title="Related Contact" id="conpgblk" rendered="{!display}" >
    <apex:outputPanel rendered="{!listWrapper.size == 0}">
    <b> NO RELATED CONTACTS FOR THIS ACCOUNT.</b>
    </apex:outputPanel>

    <apex:outputPanel rendered="{!listWrapper.size != 0}">
    <div align="center" draggable="false" >
    <apex:commandButton value="Send Email" action="{!SendEmail}" />
    <apex:commandButton value="Print Detail" action="{!PrintDetail}"/>
    </div>
    <apex:pageBlockTable value="{!listWrapper}" id="pbt1" var="wrap">
    <apex:column headerValue="Select">
    <apex:inputCheckbox value="{!wrap.checked}" id="inputBox"/>
    </apex:column>
    <apex:column value="{!wrap.con.Name}"/>
    <apex:column value="{!wrap.con.Phone}"/>
    <apex:column value="{!wrap.con.Email}"/>
    <apex:column value="{!wrap.con.Account.Name}"/>
    <apex:column value="{!wrap.con.AccountId}"/>
    <apex:column value="{!wrap.con.Id}"/>
    </apex:pageBlockTable>
    </apex:outputPanel>
    </apex:pageBlockSection>
    </apex:outputPanel>

    Below is the screen shot of the preview :Screenshot from 2018-05-30 14-51-31

     

  • Aman

    Member
    May 29, 2018 at 1:23 pm in reply to: Editing a record from selecting list of record using radio button

    Hi Jay,

    Please share your code so that i can check why it is not working and make the possible changes.

  • Hi Shiv,

    It is a known issue to salesforce and possibily it will be fixed in next few releases.

    At present VisualForce navigation methods for sforce.one SOjects are not working for Chatter or Related lists.

    sforce.one.navigateToSObject(recordId, "chatter") and sforce.one.navigateToSObject(recordId, "related")
    will always default to sforce.one.navigateToSObject(recordId, "detail")
    ** NOTE: Calls to sforce.one.navigateToURL may result in an “Unsupported Page” error if the URL references standard pages for objects or Chatter pages. To avoid this error, ensure that the URL begins with a backslash (/_ui instead of _ui). **

     

  • Hi Janaki,

    Below is the order of execution in salesforce :

    Loads the original record from the database or initializes the record for an upsert statement.
    Loads the new record field values from the request and overwrites the old values.If the request came from a standard UI edit page, Salesforce runs system validation to check the record for:Compliance with layout-specific rules
    Required values at the layout level and field-definition level
    Valid field formats
    Maximum field length
    When the request comes from other sources, such as an Apex application or a SOAP API call, Salesforce validates only the foreign keys. Prior to executing a trigger, Salesforce verifies that any custom foreign keys do not refer to the object itself.Salesforce runs user-defined validation rules if multiline items were created, such as quote line items and opportunity line items.
    Executes all before triggers.
    Runs most system validation steps again, such as verifying that all required fields have a non-null value, and runs any user-defined validation rules. The only system validation that Salesforce doesn't run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules.
    Executes duplicate rules. If the duplicate rule identifies the record as a duplicate and uses the block action, the record is not saved and no further steps, such as after triggers and workflow rules, are taken.
    Saves the record to the database, but doesn't commit yet.
    Executes all after triggers.
    Executes assignment rules.
    Executes auto-response rules.
    Executes workflow rules.
    If there are workflow field updates, updates the record again.
    If the record was updated with workflow field updates, fires before update triggers and after update triggers one more time (and only one more time), in addition to standard validations. Custom validation rules, duplicate rules, and escalation rules are not run again.
    Executes processes.If there are workflow flow triggers, executes the flows.

    The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue to create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use the Flows action in Process Builder instead.
    Executes escalation rules.
    Executes entitlement rules.
    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.
    Executes Criteria Based Sharing evaluation.
    Commits all DML operations to the database.
    Executes post-commit logic, such as sending email.

  • Aman

    Member
    May 1, 2018 at 11:06 am in reply to: What is aura definition bundle in Salesforce?

    Hi Shubham,

    Represents a Lightning definition bundle. A bundle contains a Lightning definition and all its related resources. The definition can be a component, application, event, interface, or a tokens collection.
    File Suffix and Directory Location
    A Lightning bundle is a folder that contains definition files. Unlike other metadata components, an AuraDefinitionBundle component isn’t represented by a single component file but instead by a collection of component definition files. Each definition file represents a resource in a bundle, such as markup, applications, code files (including controllers and helpers), events, documentation, and interfaces. For example, this directory structure shows the hierarchy of the folders and files for two bundles: bundle1 and bundle2.

    aura
    bundle1
    bundle1.cmp
    bundle1Controller.js
    bundle2
    bundle2.app
    bundle2.cmp
    bundle2Controller.js
    bundle2.auradoc

    Thanks

  • Hi Pranav,

    In the components you wish to include in Lightning Experience, add implements="force:appHostable" in the aura:component tag and save your changes.
    <aura:component implements="force:appHostable">
    Use the Developer Console to create Lightning components.
    Follow these steps to include your components in Lightning Experience and make them available to users in your organization.
    Create a custom tab for this component.From Setup, enter Tabs in the Quick Find box, then select Tabs.
    Click New in the Lightning Component Tabs related list.
    Select the Lightning component that you want to make available to users.
    Enter a label to display on the tab.
    Select the tab style and click Next.
    When prompted to add the tab to profiles, accept the default and click Save.
    Add your Lightning components to the App Launcher.From Setup, enter Apps in the Quick Find box, then select Apps.
    Click New. Select Custom app and then click Next.
    Enter Lightning for App Labeland click Next.
    In the Available Tabs dropdown menu, select the Lightning Component tab you created and click the right arrow button to add it to the custom app.
    Click Next. Select the Visible checkbox to assign the app to profiles and then Save.
    Check your output by navigating to the App Launcher in Lightning Experience. Your custom app should appear in theApp Launcher. Click the custom app to see the components you added.

    Thanks

  • Hi Pranav,

    You can use the following script :

    <script>
    var accountId = "{!$CurrentPage.parameters.id}";
    console.log('::::'+accountId);
    $Lightning.use("TRACT_SF:accountDetailApp", function() {
    $Lightning.createComponent(
    "TRACT_SF:accountDetail_LT",
    { "accountId" : accountId },
    "vf-app",
    function(cmp) {
    $("#test").hide()
    console.log("Component created!");
    console.log(cmp);
    });
    });
    </script>

    Thanks

  • Hi Pranav,

    Add the force:lightningQuickAction or force:lightningQuickActionWithoutHeader interface to a Lightning component to enable it to be used as a custom action in Lightning Experience or the Salesforce mobile app. You can use components that implement one of these interfaces as object-specific or global actions in both Lightning Experience and the Salesforce app.
    When used as actions, components that implement the force:lightningQuickAction interface display in a panel with standard action controls, such as a Cancel button. These components can display and implement their own controls in the body of the panel, but can’t affect the standard controls. It should nevertheless be prepared to handle events from the standard controls.

    Thanks

  • Hi Shubham,

    There are two buttons available in dataloader ‘Export’ & ‘Export All’. Difference in both button functionality is very small. When we use ‘Export’ button for any object in salesforce, all records( excluding records present in Recycle Bin) present in the system for that particular object are exported to a .csv file. But when we use Export All, all records (including records present in Recycle Bin) for that particular object are exported to a .csv file. Deleted records present in recycle bin are also called ‘soft Deleted’ records.

    Thanks

  • Aman

    Member
    May 1, 2018 at 10:47 am in reply to: Define User Managed Sharing in Salesforce?

    Hi Shubham,

    You can control whether the Sharing button is displayed on user detail pages. This button enables a user to grant others access to the user’s own user record. You can hide or display this button for all users by following these steps.

    From Setup, enter Sharing Settings in the Quick Find box, then select Sharing Settings.
    Click Edit in the Organization-Wide Defaults area.
    Select the Manual User Record Sharing checkbox to display the Sharing button on user detail pages, which enables users to share their records with others. Or deselect the checkbox to hide the button, which prevents users from sharing their user records with others.
    Click Save.
    When the organization-wide default for users is set to Public Read Only, users get read access to all other user records, can see those users in search and list views, and can interact with those users on Chatter and Communities.

    Thanks

  • Aman

    Member
    May 1, 2018 at 10:46 am in reply to: What are the type of events into Salesforce Lightning component?

    Hi Pranav,

    A component registers that it may fire an event in its markup. Events are fired from JavaScript controller actions that are typically triggered by a user interacting with the user interface.

    There are two types of events in the framework:

    Component events are handled by the component itself or a component that instantiates or contains the component.
    Application events are handled by all components that are listening to the event. These events are essentially a traditional publish-subscribe model.

    Thanks

  • Aman

    Member
    May 1, 2018 at 9:51 am in reply to: Can we implement Multilevel Approval Process in salesforce?

    Hi Pranav,
    This is all definitely possible inside Salesforce's approval process. It utilizes approval steps. This would utilize a 3 step approach.

    Here is a Youtube demonstration of a scenario of requiring two approvers 'https://www.youtube.com/watch?v=fM3xHN8M9-8'.

    Finally, here are some more examples of approval process to help you along 'https://help.salesforce.com/articleView?id=approvals_useful_approval_processes.htm&type=5'.

    Thanks

Page 3 of 8