Forum Replies Created

Viewing 26 - 50 of 110 posts
  • Piyush

    Member
    August 26, 2016 at 11:25 am

    Hi Arun,

    I am also getting the same error message  “Uncaught ReferenceError: jQuery is not defined
    throws at /resource/select_3/select2-4.0.3/dist/js/select2.min.js:3:118”.

    But when I was added  "jquery-2.2.3.min.js"  this issue was resolved.

    You should try like this :-

    <ltng:require scripts="/resource/LatestJQuery/LatestJQuery/jquery-2.2.3.min.js" />
    <ltng:require scripts="/resource/select_3/select2-4.0.3/dist/js/select2.min.js" />

    Thanks

  • Piyush

    Member
    August 22, 2016 at 12:24 pm

    Hello ,

    You can use GROUP BY and ORDER BY in a single query. Here is the sample of Query :-

    SELECT Name  FROM Account GROUP BY name ORDER BY Name LIMIT 2

    Thanks.

  • Piyush

    Member
    August 22, 2016 at 12:17 pm

    Hello ,

    You can try this sample of code to find the day name from given date.

    Datetime dt = DateTime.newInstance(Date.today(), Time.newInstance(0, 0, 0, 0));
    String dayOfWeek=dt.format('EEEE');
    System.debug('Day : ' + dayOfWeek);

    Thanks .

  • Piyush

    Member
    August 17, 2016 at 11:58 am

    Hello Arun,

    The attribute must be a Boolean type.

    Here is the sample of code wich work fine if i use attribute type is Boolean .

    <aura:component >
    <aura:attribute name="contact" type="Contact"
    default="{ 'sobjectType': 'Contact' }"/>
    <aura:attribute name="showLookup" type="Boolean" default="true"/>
    <aura:attribute name="showLookup1" type="string" default="true"/>

    <aura:if isTrue="{!v.showLookup}">
    <force:inputField value="{!v.contact.AccountId}"/>
    </aura:if>
    </aura:component>

     

     

  • Piyush

    Member
    August 17, 2016 at 11:52 am

    Hello Pranav,

    Here is the sample of code to update metadata through apex code.

    public class ApiCallout {
        public void fetch()
        {
            HttpRequest request = new HttpRequest();
            request = new HttpRequest();
            request.setEndpoint(‘https://ap2.salesforce.com/services/Soap/m/31.0’);
            request.setMethod(‘POST’);
            request.setHeader(‘Content-Type’, ‘text/xml’);
            request.setHeader(‘SOAPAction’, ‘update’);
            String b = ‘<?xml version=”1.0″ encoding=”UTF-8″?>’;
            b += ‘<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>’;
            b += ‘<soapenv:Header>’;
            b += ‘<ns1:SessionHeader soapenv:mustUnderstand=”0″ xmlns:ns1=”http://soap.sforce.com/2006/04/metadata”>’;
            b += ‘<ns1:sessionId>’ + UserInfo.getSessionId() + ‘</ns1:sessionId>’;
            b += ‘</ns1:SessionHeader>’;
            b += ‘</soapenv:Header>’;
            b += ‘<soapenv:Body>’;
            b += ‘<update xmlns=”http://soap.sforce.com/2006/04/metadata”>’;
            b += ‘<UpdateMetadata>’;
            b += ‘<currentName>QuoteSettings</currentName>’;
            b += ‘<metadata xsi:type=”ns2:QuoteSettings” xmlns:ns2=”http://soap.sforce.com/2006/04/metadata”>’;
            b += ‘<fullName>QuoteSettings</fullName>’;
            b += ‘<enableQuote>true</enableQuote>’;
            b += ‘</metadata>’;
            b += ‘</UpdateMetadata>’;
            b += ‘</update>’;
            b += ‘</soapenv:Body>’;
            b += ‘</soapenv:Envelope>’;
            request.setBody(b);
            request.setCompressed(false);
            //request.setHeader(‘Authorization’, ‘OAuth ‘ + SESSION_ID);
            String body = (new Http()).send(request).getBody();
            system.debug(‘Hello from body’+body);
        }
    }
  • Piyush

    Member
    August 17, 2016 at 9:45 am

    Hi Pranav ,

    Which type of button you use.  if you are using apex:commandButton or Ui:button. Then use  the properties of these button. Make your button disable after  first click.

    Here is the url that helps you:-

    https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_commandButton.htm

  • Piyush

    Member
    August 10, 2016 at 12:58 pm

    Hi Himanshu,

    I have to add a div section which contains a link .

  • Piyush

    Member
    June 13, 2016 at 7:53 am

    Hello Nitish,

    Here is the documentation available for rendererFn in VF ChartTip:- https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_chartTips.htm

    I have create a sample of code to implement rendererFn in visualforce page using ChartTip

    Visualforce page:-

    <apex:page controller="NewChartVfController">
    <apex:chart height="300" width="300" data="{!revenue}">
    <apex:axis type="Numeric" position="left" fields="percentage1,percentage2"/>
    <apex:axis type="Category" position="bottom" fields="label"/>
    <apex:barSeries title="Growth,Quota" orientation="vertical" axis="left"
    xField="label" yField="percentage1,percentage2" Stacked="False"
    colorset="#5B9BD5,#92D050" Gutter="75" groupGutter="75">
    <apex:chartTips height="25" width="150" rendererFn="renderChartTip"/>
    </apex:barSeries>
    </apex:chart>
    <script>
    function renderChartTip(klass, item) {
    var yField = item.yField;
    var amount = item.storeItem.get(yField === 'percentage1' ? 'amount1' : 'amount2');
    this.setTitle('Amount is ' + amount);
    }
    </script>
    </apex:page>

    Controller:-

    public with sharing class NewChartVfController
    {
    public class Bean {
    public String label {get; set;}
    public Decimal percentage1 {get; set;}
    public Decimal amount1 {get; set;}
    public Decimal percentage2 {get; set;}
    public Decimal amount2 {get; set;}
    Bean(String label, Decimal percentage1, Decimal amount1,
    Decimal percentage2, Decimal amount2) {
    this.label = label;
    this.percentage1 = percentage1;
    this.amount1 = amount1;
    this.percentage2 = percentage2;
    this.amount2 = amount2;
    }
    }
    public Bean[] revenue {
    get {
    if (revenue == null) {
    revenue = new Bean[] {
    new Bean('First', 50.00, 50000, 33.33, 33333.33),
    new Bean('Second', 25.00, 25000, 22.22, 22222.22)
    };
    }
    return revenue;
    }
    set;
    }
    }

    This example may be solve your query..

  • Piyush

    Member
    June 10, 2016 at 2:53 pm

    Hello,

    You should log a case through your partner org. Salesforce support will send you CheckMarx Security Scanner report.

  • Piyush

    Member
    June 6, 2016 at 7:59 am

    Hello Abhinav,

    You may have to log a case in salesforce to increase Apex code limit. They will provide more information about this also arrange a call with Account Executive.

  • Piyush

    Member
    June 6, 2016 at 7:56 am

    Hello Abhinav,

    Lookup record will return only first matching record. If you want to get all matching record, you should use Fast Lookup. In the fast lookup it will show all the record with given prefix.

  • Piyush

    Member
    June 6, 2016 at 7:46 am

    Hello Himanshu ,

    Yes, you can build custom Apex endpoint by using @RestResource annotation. "REST Resource" is simply an HTTP endpoint like any other.

    Thanks.

  • Piyush

    Member
    June 6, 2016 at 7:37 am

    Hello

    Interactive Voice Response (IVR) is an automated telephony system that interacts with callers, gathers information and routes calls to the appropriate recipient. An IVR system (IVRS) accepts a combination of voice telephone input and touch-tone keypad selection and provides appropriate responses in the form of voice, fax, callback, e-mail and perhaps other media.
    ACD - Automatic Call Distributor :-A phone system that performs four basic functions: answers incoming calls, gets information and instructions from database, determines the best way to handle the call, and sends the call to the proper agent, as soon as one is available.

  • Piyush

    Member
    June 6, 2016 at 7:16 am

    Hello,

    Yes, you can create Bar chart in lightning component using HighStock.js and HighChart.js. These are help you to create chart in lightning component.

    I have a sample to create chart in lightning component:-

    ChartCmp:-

    <aura:component >
    <ltng:require scripts="/resource/highstock_4_2_3/js/highstock-all.js, /resource/highstock_4_2_3/js/highcharts-3d.js, /resource/highmaps_4_2_3/js/modules/map.js"
    afterScriptsLoaded="{!c.afterScriptsLoaded}"/>

    <div aura:id="chart" class="chart_sec" style="width:20%; height:200px;"/>
    </aura:component>

    ChartCmp.js:-

    ({
    afterScriptsLoaded : function(component, event, helper) {
    var chart = new Highcharts.Chart({
    chart: {
    renderTo: component.find("chart").getElement(),
    plotBackgroundColor: null,
    plotBorderWidth: null,
    plotShadow: false,
    type: 'pie',

    },
    title: {
    text: 'Browser market January, 2015 to May, 2015'
    },
    tooltip: {
    pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
    pie: {
    allowPointSelect: true,
    cursor: 'pointer',
    dataLabels: {
    enabled: true,
    format: '<b>{point.name}</b>: {point.percentage:.1f} %',
    style: {
    color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
    }
    }
    }
    },
    series: [{
    type: 'pie',
    name: 'Browser share',
    data: [
    ['Firefox', 45.0],
    ['Chrome', 26.8],
    {
    name: 'IE',
    y: 9.8,
    sliced: true,
    selected: true
    },
    ['Safari',8.0],
    ['Opera', 9.2],
    ['Others', 10.7]
    ]
    }]
    });
    },

    })

    ChartApp:-

    <aura:application access="GLOBAL" extends="ltng:outApp">
    <c:ChartCmp />
    </aura:application>

     

  • Piyush

    Member
    May 30, 2016 at 6:48 am

    Hello Abhinav,

    Yes, Zap or Burp scan is required for the integration app because these tools are check the security hole and venerability of you app and 3rd party web service.

  • Piyush

    Member
    May 30, 2016 at 6:43 am

    Hello Abhinav,

    Go to this link to and buy the burp licence https://portswigger.net/buy/default.aspx . They will charge you $349 per user per year.

     

     

    • This reply was modified 5 years, 7 months ago by  Piyush.
  • Piyush

    Member
    May 30, 2016 at 6:40 am

    Hello Abhinav,

    Schedule the App for Burp Security Scanner:-

    1. Purchase the Burp license for the Burp scanning process of your app.
      Create a new developer org .
    2. Install the managed packed in the new developer Org.
      Follow the steps in the URL for the burp scanning process. Here is the link http://security.force.com/security/tools/webapp/burptut .
    3. Once Burp scanner complete the scanning process, we will have to generate a report for our App.The report must be in .html format.
    4. According to the issue on Burp report, you should create a False positive report. False positive report  must be in .doc format and the data should be save in the tabular form.
  • Piyush

    Member
    May 30, 2016 at 6:33 am

    Hello Abhinav,

    Salesforce Labs apps are always free and are usually unmanaged packages. Here is the link of umanaged package:- https://appexchange.salesforce.com/results?keywords=labs

     

  • Piyush

    Member
    May 30, 2016 at 6:04 am

    Hello Abhinav,

    On the AppExchange are distributed both managed or unmanaged packages. Packages are containers that hold the code and metadata associated with apps or components. There are some difference between Managed and Unmanaged package. Managed packages are maintained by the app provider and can be upgraded by the customer. Unmanaged packages are templates where the underlying code can be seen and changed but not upgraded.

  • Piyush

    Member
    May 26, 2016 at 12:39 pm

    Hello Abhinav,

    No it is not compulsory to submit false positive report for app licence. If you run Burp or Checkmarx tool to check your app vulnerability  and these tools reported any issue then you should provide false positive report. Otherwise if these tool reported  no issue then it is not compulsory.

  • Piyush

    Member
    May 26, 2016 at 12:20 pm

    Hello Abhinav,

    Yes, if the Checkmarx reported any issue in the checkmarx report. Then you have to create a false positive report according to the report.

    Thanks.

  • Piyush

    Member
    May 26, 2016 at 12:17 pm

    Hello Abhinav,

    These are the following tools that are used to check the security issue for the Salesforce app:-
    1. Checkmarkx also known as "Force.com Security Source Code Scanner".
    2. Burp Security Scanner.
    3. Security Review

  • Piyush

    Member
    May 26, 2016 at 11:21 am

    Hello Abhinav,

    The Lightning component framework’s only allow those external JavaScript libraries which was upload in Salesforce static resources. In Spring'15 release Salesforce created a new component called <ltng:require> to load libraries while being secure.
    Here is the sample for using external file in Lightning Component:-

    <ltng:require
    styles="/resource/path/to/css1[,/resource/path/to/css2]"
    scripts='/resource//path/to/js1.js,[/resource//path/to/js2.js]'
    afterScriptsLoaded="{!c.controllerFunction}"
    />

    Notes:-

    • Files paths must always start from /resource. i.e they must be a static resource to enforce security.
    • CDNs are not allowed at this point because they are outside of Salesforce data centers and can’t be controlled. In the future, we may allow admins to whitelist CDNs for their orgs.
    • If you upload a JS or CSS directly into Static resource, then you should reference them by resource name without .css or .js suffix. For example: /resource/myjsfile or /resource/mycssfile
    • If your resource is inside a zip file, then you should use .css or .js suffix. For example: /resource/<resourcename>/path/to/myjsfile.js

     

  • Piyush

    Member
    May 26, 2016 at 11:07 am

    Hello Nitish,

    I was also getting same error when i was using <force:recordEdit> component directly in the markup. You have to create it dynamically and replace it with a new dynamically created component on each action.

    Thanks.

  • Piyush

    Member
    May 26, 2016 at 10:54 am

     

    Thanks  @Surbhi for the response. This is helpful for me.

Viewing 26 - 50 of 110 posts