• ShashForce
  • PRO
  • 3208 Points
  • Member since 2014
  • Developer Relations Manager
  • Salesforce


  • Chatter
    Feed
  • 102
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 786
    Replies
Hi,
I need to disable the developement mode for the particular VisualForce page, is it possible lo disable only for particular page ???
Hey everyone,

we're currently facing the problem that we are getting the outbound message error "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" for all our outbound messages sent from salesforce without having made any changes to either salesforce or our endpoint and ssl certificates.

Our ssl root certificate is valid and is also listed in the salesforce wiki as being accepted by salesforce: http://wiki.developerforce.com/page/Outbound_Messaging_SSL_CA_Certificates#thawteprimaryrootca

As mentioned, the implementation has worked without problems until today but now somehow started throwing errors.

Maybe anyone has faced a similar problem or has an idea how to resolve the issue?

Thanks for any feedback!
So I'm building a configurable visualforce page that in an object you type the name of field sets and sech to then display a tabbed view but i get this error when i do so what am i missing 

Error: Could not resolve field '0IX' from <apex:outputField> value binding '{!LLC_BI__Loan__c[f]}' in page ncino_checklist

Apex Class
public with sharing class nCino_ChecklistExt{

    public ApexPages.StandardController stdCtrl {get; set;}
    public Boolean refreshPage {get; set;}
    List<nCino_Config__c> configvalues {get;set;}

        public nCino_ChecklistExt(ApexPages.StandardController controller) {
        stdCtrl=controller;
        refreshPage=true;
    }
    
    public List<nCino_Config__c> getConfigValues() {
    
        configvalues = [SELECT Id, Name, Tab_Name__c, Tab_Display_Order__c, Tab_Color__c, Tabbed_Content_Name__c, Icon_for_Tab__c, Field_Set__c 
                        FROM nCino_Config__c 
                        WHERE App_Name__c = 'Checklist' 
                        ORDER BY Tab_Display_Order__c DESC];
        
    return configvalues;
    }
    
    public PageReference save(){
        LLC_BI__Loan__c loan=(LLC_BI__Loan__c) stdCtrl.getRecord();
        stdCtrl.save();

      return null;
    }
    
    public PageReference cancel(){
        LLC_BI__Loan__c loan=(LLC_BI__Loan__c) stdCtrl.getRecord();  
        stdCtrl.save();  
      return null;
    }

}

Visualforce Page
<apex:page showHeader="false" sidebar="false" standardController="LLC_BI__Loan__c" extensions="nCino_ChecklistExt" standardStylesheets="true">

<head>
<apex:stylesheet value="{!URLFOR($Resource.bootstrap, '/css/bootstrap.css')}"/>
<style type="text/css">
.thebox{
    margin: 15px;
    width:auto;
    height:400px;
    background-color:#F0F0F0;
    border-radius:15px;
    }
    
.left-side{
    float:left;
    width:16.66666667%;
    background-color:#FFF;
    height:400px;
    }
    
.right-side{
    float:left;
    width:83.33333333%;
    height:400px;
    }

.border-green{border-left-color:#88C240;border-left-width:5px;}
.border-blue{border-left-color: #2D79D7;border-left-width:5px;}
.border-red{border-left-color: #BA202F;border-left-width:5px;}
.border-yellow{border-left-color: #F5AB3F;border-left-width:5px;}
.border-gray{border-left-color: #666;border-left-width:5px;}

.top-border-blue{border-top-color:#88C240;border-top-width:5px;}

</style>

<title>Untitled Document</title>
</head>
<div class="thebox">
    <div class="left-side">
        <div class="list-group" role="tablist" id="myTab">
            <apex:repeat value="{!ConfigValues}" var="cv">
                <a href="#tab{!cv.Tab_Display_Order__c}" class="list-group-item border-{!cv.Tab_Color__c}" role="tab" data-toggle="tab"><i class="gyphicon glyphicon-{!cv.Icon_for_Tab__c}"></i>&nbsp;{!cv.Tab_Name__c}</a>
            </apex:repeat>
        </div>
    </div>
    <apex:form>
    <div class="right-side tab-content" id="myTabcontent">
        <div class="tab-pane active">
            Main Page :)
        </div>
        <apex:repeat value="{!ConfigValues}" var="ncv">
            <div class="tab-pane" id="tab{!ncv.Tab_Display_Order__c}">
                <apex:pageBlock title="{!ncv.Tabbed_Content_Name__c}">
                    <apex:pageBlockSection>
                        <apex:variable value="{!ncv.Field_Set__c}" var="fieldset"/>
                        <apex:repeat value="{!$ObjectType.fieldset}" var="f">
                            <apex:outputField value="{!LLC_BI__Loan__c[f]}">
                                <apex:inlineEditSupport event="ondblclick"/>
                            </apex:outputField> 
                        </apex:repeat>  
                    </apex:pageBlockSection>     
                    <apex:pageBlockButtons location="bottom">
                        <apex:commandButton action="{!save}" value="Save"/>
                        <apex:commandButton action="{!cancel}" value="Cancel"/>
                    </apex:pageBlockButtons>                
                </apex:pageBlock>
            </div>
        </apex:repeat>
       
    </div>
    </apex:form>
</div>

<apex:includeScript value="{!URLFOR($Resource.bootstrap, '/js/jquery-2.1.1.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.bootstrap, '/js/bootstrap.min.js')}"/>

<script>
  $('#myTab a').click(function (e) {
  e.preventDefault()
  $(this).tab('show')
})
</script>
</apex:page>


Hi Dears,

I am using javascript and the Service Console Integration Toolkit.

<A HREF="#" onClick="testOpenSubtab();return false">
    Click here to open a new subtab</A>

Now when i renderAs="pdf" then its is not working. Please assist on this.

Hi,

Please help me in understanding,Is OU Auth 2.0 the only way to interact with salesforce using rest API'S or does is support the session Id(I,e the session Id we get as part of login menthod in SOAP API).

I am trying to call Query method of REST API by passing the session Id as Authorization header, I get from login method of SOAP API.I am getting below error:
<errorCode>INVALID_SESSION_ID</errorCode>
      <message>Session expired or invalid</message>

below is the url I am calling by passing Authorization header with the value of session Id I am getting from login method form SOAP API.
https://cs2.salesforce.com/services/data/v31.0/query/?q=SELECT ID,name from Contact

Please help.Are there any SOAP UI test cases or samples to refer.I am trying to test from SOAP UI.

Thanks,
Rathna
the link i have provided is that of the salesforce dashboard i hv created related to report bt wen i run this vf page i get the broken image..like in pic below

iwant to create   a gauge which points to total sum of account ( adding sum fiels of all related contacts).
https://developer.salesforce.com/blogs/developer-relations/2012/10/animated-visualforce-charts.html
i referred this link bt i dnt know where from it created the image or whethr it copied from dashboard.

      controller
:


<apex:page standardController="Account" extensions="GaugeChartController">

   <apex:chart name="MyChart" height="300" width="450" animate="true" data="{!data}">

       <apex:axis type="Gauge" position="gauge" title="Total Sum" minimum="0" maximum="300" steps="10"/>

       <apex:gaugeSeries dataField="size" donut="50" colorSet="#78c959,#ddd"/>

   </apex:chart>
   <script>

    MyChart.on('beforeconfig', function(config) {

        config.axes[0].margin=-10;});
</script>
<a class="overlay" href="https://ap1.salesforce.com/01Z90000000noOl"><img class="size-medium wp-image-10915 aligncenter" src="https://ap1.salesforce.com/01Z90000000noOl" alt="" width="300" height="156"/></a>
</apex:page>

class

public class GaugeChartController {

    public String acctId {get;set;}



    public GaugeChartController(ApexPages.StandardController controller){

        acctId = controller.getRecord().Id;

    }



    public List<gaugeData> getData() {

          Integer TotalOpptys = 0;

          Integer TotalAmount = 0;

          Integer thisMonth = date.Today().month();



          AggregateResult ar = [select SUM(Sum__c) totalsum,
                                            COUNT(Name) numC
                                   from contact

                                   where AccountId =: acctId

                                   GROUP BY LastName LIMIT 1];



          List<gaugeData> data = new List<gaugeData>();

          data.add(new gaugeData(Integer.valueOf(ar.get('numC')) + ' contact', Integer.valueOf(ar.get('totalsum'))));


          return data;

     }



    public class gaugeData {

        public String name { get; set; }

        public Integer size { get; set; }



        public gaugeData(String name, Integer data) {

            this.name = name;

            this.size = data;

        }


}
}

   User-added image


I've recently started working with Salesforce, so this is all still pretty new to me. I just got OAuth working with the PHP Toolkit, and I'm not able to perform queries. Great! The trouble is I'm a little perplexed by what I'm getting.

In any Records object, I'm getting three fields: Id, any, and type. Id and type make sense, but any seems to be xml for every non-id column I've queried.. I am using the Partners.wsdl, and I understand it's loosely typed. Is this a consequence of using that? It's just unfortunate that I'll have to parse every value for every object. That can result in a  lot of overhead.

Thanks for any and all advice!
Hi

I am trying to update picklist value for leadsource through metadata api but not sure why getting 'Concurrent modification from setup pages' error. 
Below is my code :
private bool UpdatePicklist(string sfObject, string picklistName, List<string> picklistValues)
        {
            List<string> extraPickList = new List<string>();
            if (_ms == null)
                GetMetaDataService();
            DescribeSObjectResult sr = _sf.describeSObject(sfObject);
            if (sr == null || sr.fields == null || sr.fields.Length == 0)
            {
                _log.Info("Error occured : sf object description is null");
                return false;
            }

            foreach (Field field in sr.fields)
            {
                if (!(field.type == fieldType.picklist && field.name == picklistName))
                    continue;
                foreach (PicklistEntry entry in field.picklistValues)
                {
                    if (!picklistValues.Contains(entry.value))
                    {
                        extraPickList.Add(entry.value);
                    }

                }
                if (extraPickList.Count > 0)
                {
                    extraPickList.AddRange(picklistValues);
                    CustomField co = new CustomField();
                    co.fullName = sfObject + "." + picklistName;
                    co.type = (SfApi.FieldType)Enum.Parse(typeof(SfApi.FieldType), "Picklist");
                    co.picklist = new Picklist();
                    co.picklist.sorted = true;
                    List<PicklistValue> picklistArray = new List<PicklistValue>();
                    foreach (string picklistValue in extraPickList)
                    {
                        PicklistValue pick = new PicklistValue();
                        pick.fullName = picklistValue;
                        // setting default value
                        if (picklistValue == "Other")
                            pick.@default = true;
                        picklistArray.Add(pick);
                    }
                    co.picklist.picklistValues = picklistArray.ToArray();
                    Metadata[] m = new Metadata[] { co };
                    UpdateMetadata um = new UpdateMetadata();
                    um.metadata = m[0];
                    UpdateMetadata[] uma = new UpdateMetadata[] { um };
                    AsyncResult r = _ms.update(uma)[0];
                    //AsyncResult r = _ms.create(m)[0];
                    while (!r.done)
                    {
                        System.Threading.Thread.Sleep(10 * 1000);
                        r = _ms.checkStatus(new string[] { r.id })[0];
                        _log.Info("Still On");
                    }
                    if (r.state == AsyncRequestState.Error)
                    {
                        _log.Info("Error : " + r.statusCode + " " + r.message);
                        return false;
                    }
                    else
                    {
                        _log.Info("Picklist successfully recreated");
                        return true;
                    }
                }
                else
                    return true;
                break;
            }
            return false;
        }

Please let me know the solution for this, tried many things but no success.
I'm having a hard time getting answer as to how to properly set up Public Knowledge when using multiple sites and categories. 

We have 3 main categories groups set up with sub categories in each. The main Categories are "Print and Sign", "Nonprofit" and "Small-Medium Business". Each category is assigned to a different site. We have some articles that are only assigned to the Nonprofit category. However, when you search on the site that's using the "Small-Medium Business" category and search using "No Filter", articles that only belong to the Nonprofit category are returned even though they don't belong to that category and specifically say "No Category" in Article Management for "Small-Medium Business".

I've tried editing the Visibility Settings to change from "All Categories" to Custom categories and that doesn't fix the problem. What am I missing? How can I restrict articles that are returned in searches with No filters? Is that the intended result when "No Filter" is selected?

Here are some images of how I have things set up:

here are the data categories. Each Category has children categories and all of them have "All" as the first subcategory.

User-added image

Data Category Visibility Settings:
User-added image

I have three sites. Each Site is set up to use a different Category and each site's profiles has data visibilty to a different category:

User-added image

Here's how an Article is set up and it's only category is "Nonprofit".
User-added image

When I go to the site for "Print and Sign" and do a search using "No Filter", it returns the article from above that is only assigned to the "Nonprofit" category.

User-added image

Can anyone help me figure out how to limit the search results to only articles that belong to a specific category? Do I need to set up the categories different? I've tried changing visibility settings and that seems to only cause the filter list to change (as in all of the sub categories are gone).
Hi All,

I am creating a service console app for service cloud. I wanted to integrate facebook and twitter with the service console app so that cases can be generated from facebook and twitter. But I don't know how to do it and I didn't find any helping guide or material. Please help.
Does anybody has a working example that uses the connection.login.js ?

I'm trying to connect to salesforce from an exterior website using javascript and getting an Error.

Here is My code:

<!DOCTYPE HTML>
<HTML>
<HEAD>

<script src="https://na6.salesforce.com/soap/ajax/30.0/connection.js" ></script>

<script type="text/javascript" >

function logincall()
{

    try{
   
   
    var usrname = document.getElementById('userid').value;
    var passwrd = document.getElementById('passid').value;

    if(usrname == null || usrname == '' || passwrd == null || passwrd == '')
    {
        alert('Please enter Username AND Password');
        return;
    }
   
    var result = sforce.connection.login(usrname, passwrd);

    alert("Logged in with session id " + result.sessionId);
    }
    catch(error)
    {
        alert(error);
       
       
    }

}
</script>

</HEAD>

<BODY>

To test logging into a Salesforce Instance using the connection.js "login" call

<table>
        <tr>
            <td>Username</td>
            <td><input type="text" id="userid" value="" /></td>
        </tr>
        <tr>
            <td>Password</td>
            <td><input type="password" id="passid" value="" /></td>
        </tr>

</table>

    <input type="button" value="Login" onclick="logincall();" />

</BODY>

</HTML>


I'm getting an Error :  The requested url services/Soap/u/30.0 was not found on this server


Any idea anyone?

I am using a 30-day trial version of force.com
When I am trying to create project in Eclipse IDE(Kepler), after entering credentials and security token, I am getting the message as " Force.com require an organisation with the metadata API enabled. API is not enabled for this Organisation or Partner"
Can someone help in getting this work for me.
Thanks in adavance!!!
Hi,
I have a Custom Object named preferred rate. It is related to the account in a Master detail relation ship with the account being the Master.

There are two record types in Account named Customer and SIte with the Customer Record type being the Parent of the Site Account record type. A Preferred Rate record can be created on Customer as well as Site account.

I am looking for a validation rule such that When the Expiration Date entered on the Preferred Rate record on Site Account is greater than that on the Customer Account, it should throw an error.
The Site Account record type is the child of the Customer Record Type.
 Hi all,

I'm trying to create a job to update account data via the bulk API matching on the salesforce id.
I could create the job and the batch ok, however i continuously get an error when the batch tries to run: it keeps telling me that the salesforce id field available in the CSV file, whatever the way i named it:
I've tried Id, RecordId, id (in lower case), AccountNumber and for all 4 tentatives, i got the same error message.
I need to be able to mass-update data using the salesforce id (the data i've got was pulled out of salesforce with the SOAP API, retaining the field names the way they are provided by the SOAP API) and can't rely on external id (i'll be always pulling out data from salesforce first, therefore i'll have the salesforce id).

I've been struggling on this error since beginning of the week, unable to find relevant information on using salesforce id in bulk API update specifically. I would be really grateful if someone could help.

Thx in advance
Hi,
Is there any one written a trigger to retrieve price from selected price book into customer object?
Please advice
Thank you