• Shri Raj
  • NEWBIE
  • 299 Points
  • Member since 2014

  • Chatter
    Feed
  • 4
    Best Answers
  • 2
    Likes Received
  • 5
    Likes Given
  • 32
    Questions
  • 119
    Replies
Hi All,

Here is my business requirement and I never worked on webservices. 

1. We have specif objects and fields to consume by Oracle.
2. Oracle will consume the webservice and then should be able to  updated few fields in SFDC.

My Assumptions:
Simply generate WSDL and provide them to consume the webservice?
or Do we have to write any classes for each object to expose the data?

Please help me, how I have to achieve this.

regards,
Ajay

  • August 05, 2014
  • Like
  • 0
Hi

Is it possible to filter child records to only the one which is added recently (based on created date).. i have a requirement to get the rullup summary for only the recently added child object field value.

i know we can do via apex. just wanted to check if there is any option with config

thanks
Hello guys,i would like to know.How many connect Apps i can have in one Salesforce organization?
Hi,
I was wondering which method is closer to best practice:


List<CampaignMember> members = [Select Id, Status From CampaignMember Where Status='Registered'];
Set<CampaignMember> memSets = new Set<CampaignMember> (members);

OR 

List<CampaignMember> members = [Select Id, Status From CampaignMember Where Status='Registered'];
Set<CampaignMember> memSets = new Set<CampaignMember> ();

memSets.addAll(members)

Hi All, 

Would it be possible to have an Validation Check in place or some kind of an pop-up asking "Are You Sure" before deploying code into Server? 
Right Click on an eclipse Project --> Force.com-->Deploy to Server

Before  Deploying to server, Do we have any option in Eclipse which we can enable to precheck. I have accidentally Hit on "Deploy to Server" rather than "Refresh from Server".  

Hello,

Is there anyway out in Salesforce where we can export data in .TSV / Tab Separated Values? Can you kindly suggest some good tools from the market?

Thanks,
Shri

Hi, 

 

Can someone refer me any links which would describe about the Integration from Salesoforce --> External System using OAuth Mechanism. Please make sure the first call goes from Salesforce. Not the other way around. 

Thanks
-Shri

Can anyone share an example considering Account as an example. 

Thanks
Shri

Hello All.

 Here is the challenge which i need to implement and looking for a solution approach. 

I need to implement a custom VF Page Search Functionality inside Salesforce. The Data is inside Elastic Search which is a open source Search & Analytic engine. The Elastic Search is inside our Company's network. I have the API to access using JSON & I'm able to do it using a REST based tool. 

Now, Since Salesforce is outside our Company's network i need to authenticate using Ping Identity & then access Elastic Search API. 

I'm really not sure about how this authentication works since the first call will be from Salesforce everytime. Can someone please help. I'm unsure if this will be using SSL or OAuth etc.

Thanks, 

Shri.

Hello, 

I would like to know if there is an email notification by default which would notifies the Users when the owner of that a particular record is assigned to them? 
I see a default check box which can also be set false. But i want to keep it active. Any profile permissions? 

Thanks, 

Shri

Hello All,

I know we can upload a CSV into Salesforce using various different ways. I'm conducting a POC in my company to upload a CSV file into Salesforce using a JAVA program. Can someone please guide or provide any reference links? 

Thanks, 
Shri

There are two record Types. RT1 and RT2. And a Status picklist field based on the recordtype. 

One a VF Page, If a user only has access to RT1 then he/she is able to see only picklist values which are displayed for RT1. 
One a VF Page, If a user only has access to RT2 then he/she is able to see only picklist values which are displayed for RT2.

If i add a permission set for a Users and give access to both the RecortyTypes RT1 & RT2, On the Visualforce Page its displaying all the picklist values and not by the Recordtype of that record. 

Please guide
Shri
I'm trying to access an external System which is inside my office network. Using the POST method I will try to access the data from that system. For Eg : If i pass the zipcode, I can get the city Name. 

What all are the things i need to consider before making this call to that system apart from the EndPoint. 

Thanks
Hello, 

Can someone explain what exactly is Authentication and how does it work in Salesforce for REST & SOAP based integrations. Please mention in simple terms. 

Thanks
I'm trying to access a inhouse EndPoint in my company from Salesforce.com through HTTP POST Method. How does the Authentication work on the Salesforce side? Before accessing the End Point do i need setup anything else on the Salesforce side?  
Hello All,

I will try to frame my question in short.

End Goal : REST API Integration from Salesforce to a InHouse Lead Management System(LMS2)

SUCCESS Through Chrome APP
1.  All i need to do is retrieve values from LMS2. When i tried to use the Chrome APP 'Advanced Rest Client' and have passed the appropriate URL and Content in XML/TEST format in the form of POST methoed I was able to retrieve the values from LMS2 database.
For EG : If i pass 92126 then i was able to get 'SAN DIEGO' which is correct.

Here is the link (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US)for Advanced REST Client.


PROBLEM from Salesforce :

2) When i created this REST class in SAlesforce and tried invoking the End Point then its throwing this error.

System.HttpResponse[Status=Service Unavailable, StatusCode=503]

public with sharing class LmsRestApiIntegration {

//LmsRestApiIntegration.invokeRestAPI()
@future(callout = true)
public static void invokeRestAPI(){
String URL = 'http://pasquote-bfapp.tent.trt.ccc.pri/QuickQuoteWebSvc/QQWebSvc.asmx';
String xmlContent = '';
xmlContent = '<?xml version="1.0" encoding="utf-8"?>';
xmlContent = xmlContent + '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
xmlContent = xmlContent + '<soap:Body>';
xmlContent = xmlContent + '<GetCityListFromZip xmlns="http://www.ccc.com/irv/quickquote/auto/2006/10/01">';
xmlContent = xmlContent + '<zipcode>92126</zipcode></GetCityListFromZip>';
xmlContent = xmlContent + '</GetCityListFromZip>';
xmlContent = xmlContent + ' </soap:Body>';
xmlContent = xmlContent + '</soap:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setBody(xmlContent);
req.setHeader('content-type','text/xml');
req.setHeader('content-length', '0');
req.setEndpoint(URL);
req.setHeader('SoapAction', 'http://www.ccc.com//irv/quickquote/auto/2006/10/01/GetCityListFromZip');
req.setMethod('POST');
String response = '' ;
HttpResponse res = h.send(req);
response = res.getBody();

System.debug('Response :'+response);

}
}

Please guide.

Thank You
Shri
Hello All,

I will try to frame my question in short.

End Goal : REST API Integration from Salesforce to a InHouse Lead Management System(LMS2)

SUCCESS Through Chrome APP
1.  All i need to do is retrieve values from LMS2. When i tried to use the Chrome APP 'Advanced Rest Client' and have passed the appropriate URL and Content in XML/TEST format in the form of POST methoed I was able to retrieve the values from LMS2 database.
For EG : If i pass 92126 then i was able to get 'SAN DIEGO' which is correct. 

Here is the link (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US)for Advanced REST Client.


PROBLEM from Salesforce :

2) When i created this REST class in SAlesforce and tried invoking the End Point then its throwing this error. 

System.HttpResponse[Status=Service Unavailable, StatusCode=503]

public with sharing class LmsRestApiIntegration {

//LmsRestApiIntegration.invokeRestAPI()
@future(callout = true)
public static void invokeRestAPI(){
String URL = 'http://pasquote-bfapp.tent.trt.csaa.pri/QuickQuoteWebSvc/QQWebSvc.asmx';
String xmlContent = '';
xmlContent = '<?xml version="1.0" encoding="utf-8"?>';
xmlContent = xmlContent + '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
xmlContent = xmlContent + '<soap:Body>';
xmlContent = xmlContent + '<GetCityListFromZip xmlns="http://www.csaa.com/irv/quickquote/auto/2006/10/01">';
xmlContent = xmlContent + '<zipcode>92126</zipcode></GetCityListFromZip>';
xmlContent = xmlContent + '</GetCityListFromZip>';
xmlContent = xmlContent + ' </soap:Body>';
xmlContent = xmlContent + '</soap:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setBody(xmlContent);
req.setHeader('content-type','text/xml');
req.setHeader('content-length', '0');
req.setEndpoint(URL);
req.setHeader('SoapAction', 'http://www.csaa.com//irv/quickquote/auto/2006/10/01/GetCityListFromZip');
req.setMethod('POST');
String response = '' ;
HttpResponse res = h.send(req);
response = res.getBody();

System.debug('Response :'+response);

}
}

Please guide.

Thank You
Shri
Just like we generate a PDF File using Apex/VF, Can we render Data in an XML format from a Page or anywhere else? And also, Can we Zip the attachment? The reason is, Thats how we are supposed to email the attachment to a particular address. Therefore,

1. Render data in an XML Attachment
2. Zip the attachment
3. Email the attachment. (I know we can do this)

Please guide

Thanks
Shri
Just like we generate a File using Apex, Can we render Data in an XML format? And also, Can we Zip the attachment? The reason is, Thats would we are supposed email the attachment to a Particular address. Therefore, 

1. Render data in an XML Attachment
2. Zip the attachment
3. Email the attachment. (I know we can do this) 

Thanks
Shri

Hello, 

Is there any ways where i can Partially inactivate an Inline Edit. Here is the scenario. 

Bascially i have a custom Related List which is a VF Page which supports an Inline Edit . I Also have a 'Mass Edit' button on the related list which opens up a 'Mass Edit' PageBlockSection. Whenever the Mass Edit button is clicked then i would like to inactivate the InlineEdit. Orelse keep it active. 

Thanks,
Shri


 

Hello, 

I have been trying to parse an WSDL into Salesforce and im receiving the following error. Please help.

Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}schema

Hello, 



I was trying to Parse an XML into our Salesforce Dev org and I was getting this error. Kindly suggest what could be the problem. 

Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}schema

Thanks,
Shri

Hello ,

We are planning to have a integration from Salesforce to an External System. Salesforce --> Lead Management System. Here I'm not sure if this will be only SOAP or REST could also be possible.

Before i start working on this, I would like to Integrate both Salesforce DEV and Salesforce UAT. I have Parsed the WSDL from UAT into DEV where 3 of Apex classes are created. From here onwards I'm not sure how can i take it forward. Like, Passing the Credentials and inserting/updating data from Dev to UAT.

Kindly suggest.
Shri

Hello, 


I have been getting this error. Since im using this free appliation for the first time online, It doest provide a free informatica support. Did anyof you face the same problem? What could be the problem? 
Since im testing the app, My task is light weight. Im planning to insert 2 Account records from one Sandbox instance to another. 

[FATAL] GetServerTimestamp failed. User [UserName]. Fault code [3]. Reason [SOAP Error : [Tag Error : MisMatch]. Please Contact Informatica Customer support.].
 

Hello All,

I will try to frame my question in short.

End Goal : REST API Integration from Salesforce to a InHouse Lead Management System(LMS2)

SUCCESS Through Chrome APP
1.  All i need to do is retrieve values from LMS2. When i tried to use the Chrome APP 'Advanced Rest Client' and have passed the appropriate URL and Content in XML/TEST format in the form of POST methoed I was able to retrieve the values from LMS2 database.
For EG : If i pass 92126 then i was able to get 'SAN DIEGO' which is correct.

Here is the link (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US)for Advanced REST Client.


PROBLEM from Salesforce :

2) When i created this REST class in SAlesforce and tried invoking the End Point then its throwing this error.

System.HttpResponse[Status=Service Unavailable, StatusCode=503]

public with sharing class LmsRestApiIntegration {

//LmsRestApiIntegration.invokeRestAPI()
@future(callout = true)
public static void invokeRestAPI(){
String URL = 'http://pasquote-bfapp.tent.trt.ccc.pri/QuickQuoteWebSvc/QQWebSvc.asmx';
String xmlContent = '';
xmlContent = '<?xml version="1.0" encoding="utf-8"?>';
xmlContent = xmlContent + '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
xmlContent = xmlContent + '<soap:Body>';
xmlContent = xmlContent + '<GetCityListFromZip xmlns="http://www.ccc.com/irv/quickquote/auto/2006/10/01">';
xmlContent = xmlContent + '<zipcode>92126</zipcode></GetCityListFromZip>';
xmlContent = xmlContent + '</GetCityListFromZip>';
xmlContent = xmlContent + ' </soap:Body>';
xmlContent = xmlContent + '</soap:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setBody(xmlContent);
req.setHeader('content-type','text/xml');
req.setHeader('content-length', '0');
req.setEndpoint(URL);
req.setHeader('SoapAction', 'http://www.ccc.com//irv/quickquote/auto/2006/10/01/GetCityListFromZip');
req.setMethod('POST');
String response = '' ;
HttpResponse res = h.send(req);
response = res.getBody();

System.debug('Response :'+response);

}
}

Please guide.

Thank You
Shri

Hello, 

I have implemented Custom Sorting on a VF page using Comparable Interface. If there are 10 records in a Page and few of the fields on the records are NULL then the List.Sort method is not functioning properly when there are NULL and NOT NULL fields included. Please suggest. 
 

Thanks

I developed a visual force page that uses Angular JS and it works fine on Chrome and Firefox browsers.

It also works fine when running on IE at my house.

The problem is, when I run it on IE at my office, where we have a firewall, some of the script stop working.

Help , anyone ? 

Thanks!!
Hi Guys,

Below is the format in which i had to send data.
POST https://<target_domain>/db/main HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_Authenticate
<qdbapi>
   <username>PTBarnum</username>
   <password>TopSecret</password>
   <hours>24</hours>
   <udata>optional data</udata>
</qdbapi>

Below is the APEX class i am using to build the above request.
HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
        string test = ' <qdbapi><username>xx</username><password>xx</password><hours>24</hours><udata>optional data</udata></qdbapi>';
        req.setEndpoint('https://oneroofenergy.quickbase.com/db/main HTTP/1.0');
		req.setheader('content-Length','');
		req.setheader('QUICKBASE-ACTION','API_Authenticate');
		req.setHeader('Content-Type', 'application/xml');  
        req.setMethod('POST');
        req.setBody(test);
		res = http.send(req);
system.debug(res);

I get bad request as the responce.
i need some help in finding out where i am going wrong.

Thanks,
Vishnu
I need to use SOQL or the API to get a count of users that are currently logged in. How can I do this?

http://docs.releasenotes.salesforce.com/en-gb/summer14/release-notes/communities_custom_domain_URL.htm

 

This page says that we must contact Salesforce, that's great but who in Salesforce do we contact?

I have a chunk of about 300 unresolved items that I would like to resolve using dataloader. This is my thought process on how this could work.

Download all of my unresolved items
Download all of my contacts

Match up the unresolved items to their corresponding Contact's SF ID.
Then re upload them to SF.

However I'm not sure how to do that last step. What route would I take to attach the unresolved item to a contact? Can someone help me with the parameters of that upload process?
I need to get the list of piclist values for a salesforce field inside my c# application.

I'd be happy to use the rest api, the .NET api and client.DesribeAsync method, or anything else.

I'd appreciate any help to point me in the right direction.

Scott
I'm trying to access an external System which is inside my office network. Using the POST method I will try to access the data from that system. For Eg : If i pass the zipcode, I can get the city Name. 

What all are the things i need to consider before making this call to that system apart from the EndPoint. 

Thanks
Hello All,

I will try to frame my question in short.

End Goal : REST API Integration from Salesforce to a InHouse Lead Management System(LMS2)

SUCCESS Through Chrome APP
1.  All i need to do is retrieve values from LMS2. When i tried to use the Chrome APP 'Advanced Rest Client' and have passed the appropriate URL and Content in XML/TEST format in the form of POST methoed I was able to retrieve the values from LMS2 database.
For EG : If i pass 92126 then i was able to get 'SAN DIEGO' which is correct.

Here is the link (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US)for Advanced REST Client.


PROBLEM from Salesforce :

2) When i created this REST class in SAlesforce and tried invoking the End Point then its throwing this error.

System.HttpResponse[Status=Service Unavailable, StatusCode=503]

public with sharing class LmsRestApiIntegration {

//LmsRestApiIntegration.invokeRestAPI()
@future(callout = true)
public static void invokeRestAPI(){
String URL = 'http://pasquote-bfapp.tent.trt.ccc.pri/QuickQuoteWebSvc/QQWebSvc.asmx';
String xmlContent = '';
xmlContent = '<?xml version="1.0" encoding="utf-8"?>';
xmlContent = xmlContent + '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
xmlContent = xmlContent + '<soap:Body>';
xmlContent = xmlContent + '<GetCityListFromZip xmlns="http://www.ccc.com/irv/quickquote/auto/2006/10/01">';
xmlContent = xmlContent + '<zipcode>92126</zipcode></GetCityListFromZip>';
xmlContent = xmlContent + '</GetCityListFromZip>';
xmlContent = xmlContent + ' </soap:Body>';
xmlContent = xmlContent + '</soap:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setBody(xmlContent);
req.setHeader('content-type','text/xml');
req.setHeader('content-length', '0');
req.setEndpoint(URL);
req.setHeader('SoapAction', 'http://www.ccc.com//irv/quickquote/auto/2006/10/01/GetCityListFromZip');
req.setMethod('POST');
String response = '' ;
HttpResponse res = h.send(req);
response = res.getBody();

System.debug('Response :'+response);

}
}

Please guide.

Thank You
Shri
Hello All,

I will try to frame my question in short.

End Goal : REST API Integration from Salesforce to a InHouse Lead Management System(LMS2)

SUCCESS Through Chrome APP
1.  All i need to do is retrieve values from LMS2. When i tried to use the Chrome APP 'Advanced Rest Client' and have passed the appropriate URL and Content in XML/TEST format in the form of POST methoed I was able to retrieve the values from LMS2 database.
For EG : If i pass 92126 then i was able to get 'SAN DIEGO' which is correct. 

Here is the link (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US)for Advanced REST Client.


PROBLEM from Salesforce :

2) When i created this REST class in SAlesforce and tried invoking the End Point then its throwing this error. 

System.HttpResponse[Status=Service Unavailable, StatusCode=503]

public with sharing class LmsRestApiIntegration {

//LmsRestApiIntegration.invokeRestAPI()
@future(callout = true)
public static void invokeRestAPI(){
String URL = 'http://pasquote-bfapp.tent.trt.csaa.pri/QuickQuoteWebSvc/QQWebSvc.asmx';
String xmlContent = '';
xmlContent = '<?xml version="1.0" encoding="utf-8"?>';
xmlContent = xmlContent + '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
xmlContent = xmlContent + '<soap:Body>';
xmlContent = xmlContent + '<GetCityListFromZip xmlns="http://www.csaa.com/irv/quickquote/auto/2006/10/01">';
xmlContent = xmlContent + '<zipcode>92126</zipcode></GetCityListFromZip>';
xmlContent = xmlContent + '</GetCityListFromZip>';
xmlContent = xmlContent + ' </soap:Body>';
xmlContent = xmlContent + '</soap:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setBody(xmlContent);
req.setHeader('content-type','text/xml');
req.setHeader('content-length', '0');
req.setEndpoint(URL);
req.setHeader('SoapAction', 'http://www.csaa.com//irv/quickquote/auto/2006/10/01/GetCityListFromZip');
req.setMethod('POST');
String response = '' ;
HttpResponse res = h.send(req);
response = res.getBody();

System.debug('Response :'+response);

}
}

Please guide.

Thank You
Shri
Just like we generate a PDF File using Apex/VF, Can we render Data in an XML format from a Page or anywhere else? And also, Can we Zip the attachment? The reason is, Thats how we are supposed to email the attachment to a particular address. Therefore,

1. Render data in an XML Attachment
2. Zip the attachment
3. Email the attachment. (I know we can do this)

Please guide

Thanks
Shri
Our company implemented Salesforce about 15 months ago and we are now getting into creating callouts to consume data from different sources. We will be implementing a Customer Portal for our customers to be able to log in and track their equipment. The manufacturer has provided us with a URL to the site feed which will be providing the data. We will be creating the necessary custom objects in Salesforce to store the data and laying the foundation before the Cusotmer Portal becomes live. What I am interested in is creating the call out to the site to reqquest the data. We are looking at retrieving the data at the customer's request so real-time data would be ideal, but end-of-day stats would be doable as most of our customers only want to see what their equipment was doing for any given day anyway. 

Where can I find some documentation, tutorials, etc. on how to create this in Salesforce? 
Hi ,

How to customize the Details view of Live agent Console. and from where it is showing the data in that.


Hello

I created a very simple schedulable interface that executes a number of Batch jobs. 

Is is possible to run additional code only once all batch jobs are complete?
See below.

Thanks a lot in advance
Giorgio

global class iRT_SCHEDULE_Contest implements Schedulable{
   global void execute(SchedulableContext SC) {
 
  List<Contest__c> cList = new List<Contest__c>();  

  cList = [select id from Contest__c]; 
  delete cList;  
 
     // We set the size to 20, 50 etc so that the Batch Jobs reset the governor limits every x iterations
  iRT_BATCH_Contest actuals = new iRT_BATCH_Contest(); 
       database.executebatch(actuals,1); 

>>> CAN I ADD SOME CODE HERE, THAT RUNS ONLY AFTER ALL BATCH JOBS ARE COMPLETE?

              
   }

I have an SOSL FIND query to find contacts by phone number:
FIND {*' + phone + '} IN PHONE FIELDS RETURNING Contact(LastName, FirstName, AccountId)';
I'd also like to return the accounts for each contact (if one exists) joining on Contact.AccountId. Is it possible to do in one statement? If not, how would I loop through the results to get the account, and return all in json format?

Hello guys,

I want to export my SFDC data using dataloader in batch mode using it's CLI. But I want the exported data in TSV(tab separated version/tab delimiter separated file). It is mentioned in the dataloader document that data can be exported in CSV and TSV format both. But I am still unable to find it how. If you guys have any idea then please guide me.

  • November 29, 2010
  • Like
  • 0
I found this out the very hard way and I would like to share my findings to either warn others, or find out if I've done something wrong somehow.  Sobjects cannot be handed lists of objects via addAll (even though they can be added objects one at a time through add, and OTHER methods that have sObject lists as parameters can accept object lists).

I'll show by example:
Account a = new Account();
sObject s
LIST<sObject> sOjbList = new LIST<sObject>();
sOjbList.add(s);
sOjbList.add(a);
That works perfectly fine, as you'd expect.
sObject s1;
sObject s2;
LIST<sObject> sList = new LIST<sObject>{s1, s2};
LIST<sObject> sOjbList = new LIST<sObject>();
sOjbList.addAll(sList);
Also works fine.

This, however, will fail.
LIST<Account> aList = new LIST<Account>{new Account(), new Account()};
LIST<sObject> sOjbList = new LIST<sObject>();
sOjbList.addAll(aList);
It gives the errors:
Incompatible argument type LIST for All method on LIST
OR
Incompatible argument type LIST<Account> for All method on LIST<SObject>
(Based on if you're using the Developer Console or something else, like MavensMate)

But don't fret, there's a solution (albeit a silly one)
private LIST<sObject> objToSobj(sObject[] objList)
{
	return objList;
}
That's right, pass your objList through this (and it will let you without problem) and all works fine.

Thoughts?
I'm experiencing a strange error with Salesforce's Inline Editing in a custom visualforce page. I have a sObject with a date field called Start_Date__c, and I have inline editing set up in the VisualForce like this:
<apex:page standardController="Product_Assignment__c"
    tabStyle="Product_Assignment__c"
    extensions="TestInlineEditControllerExt">

<apex:form id="productForm">
    <apex:pageBlock >
        <apex:pageMessages />
        <apex:pageBlockTable value="{!productAssignments}" var="productAssignment">
            <apex:column headerClass="h1">
                <apex:facet name="header">Start Date</apex:facet>
                <apex:outputField value="{!productAssignment.Start_Date__c}">
                    <apex:inlineEditSupport changedStyleClass="dirtyField" event="ondblclick" showOnEdit="saveChanges" />
                </apex:outputField>
            </apex:column>
        </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:commandButton id="saveChanges" reRender="productForm" action="{!quicksave}" value="Save Changes" styleClass="saveChangesButton" />
</apex:form>
</apex:page>
The custom controller is (this is not my exact code, but it's enough to replicate the issue):
public with sharing class TestInlineEditControllerExt {
    public List<Product_Assignment__c> productAssignments { get; set; }

    public TestInlineEditControllerExt(ApexPages.StandardController stdController) {
        stdController.addFields(new List<String> { 'Start_Date__c' });
        productAssignments = new List<Product_Assignment__c> {
            (Product_Assignment__c)stdController.getRecord()
        };
    }
}
This works well in normal use cases. If I edit the field an input a deliberately incorrect value (like 'abcdef'), and press save, I receive the expected error: Start Date: Invalid Date and Time.

After this, if I attempt to click the revert button and save again, I receive a cryptic error message: Start Date: Value cannot exceed 0 characters.

I've tried following this pattern on a standard detail page, but this issue only seems to happen on my custom visualforce page. I've also tried using a custom action (instead of "quicksave") on my controller, but have the same issue (error message, controller is never called). We do not have any validation rules in place for this field.

Does anybody know why this error is happening and how I can fix this issue? It seems to only happen when I have an inline editing component inside of an apex:pageBlockTable or apex:repeat element.

Today we’re excited to announce the new Salesforce Developers Discussion Forums. We’ve listened to your feedback on how we can improve the forums.  With Chatter Answers, built on the Salesforce1 Platform, we were able to implement an entirely new experience, integrated with the rest of the Salesforce Developers site.  By the way, it’s also mobile-friendly.

We’ve migrated all the existing data, including user accounts. You can use the same Salesforce account you’ve always used to login right away.  You’ll also have a great new user profile page that will highlight your community activity.  Kudos have been replaced by “liking” a post instead and you’ll now be able to filter solved vs unsolved posts.

This is, of course, only the beginning  and because it’s built on the Salesforce1 Platform, we’re going to be able to bring you more features faster than ever before.  Be sure to share any feedback, ideas, or questions you have on this forum post.

Hats off to our development team who has been working tirelessly over the past few months to bring this new experience to our community. And thanks to each of you for helping to build one of the most vibrant and collaborative developer communities ever.
 

As many of you have discovered, our developer community is awesome. The wealth of knowledge here is phenomenal. This is an all volunteer community and people who take the time to help and post answers do so totally on their own initiative. With that said when someone provides the right answer to your question please take the time to mark their answer as the accepted solution. Also give them a kudos if they've really gone the extra mile to help out. Show some love ;)

I recently downloaded APEX Data Loader version 27.0.1. My colleague has a batch job that does a bulk upload of records to our salesforce account. I tried running the script on my computer and kept getting an error. I narrowed down the culprit to be the output of the command line when running encrypt.bat. 

 

When running the command line prompt "ecrypt.bat -g seed_text_here", the script is expecting the output to be just the key that should be saved to key.txt. This is consistent with the online video tutorial located here: http://www.salesforce.com/_app/video/data_loader/help/data_loader_cli.jsp

 

However, when I run "ecrypt.bat -g seed_text_here" on my computer, I get the following output: 

2013-04-24 15:06:21,050 INFO [main] security.EncryptionUtil main (EncryptionUtil.java:304) - encrypted_password_key_here

 

It appears to be an issue with setting the logging level. Any ideas on how to change this? 

 

Thanks.

  • April 24, 2013
  • Like
  • 1