• Mike Leach
  • NEWBIE
  • 210 Points
  • Member since 2005


  • Chatter
    Feed
  • 7
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 56
    Questions
  • 217
    Replies

Hello
 
I am using .net code c#. We are using both Partner WSDL & Enterprise WSDL.

Few years back we have created some fields in opportunity objects. For some resion we are not using them anymore.
Now we have decided to remove those fields from opportunity objects.

My question is that, Do i need to update Partner WSDL & Enterprise WSDL references? or it will be work with the existing one?

 

Thanks in advanced.

 

Rajesh

My scenario is:

 

Gather Leads from website and post to SF along with sending emails internally, also updating the Lead Source field. 

 

I have Page1 where I gather data from the user, Page2 - Send email using data from page1 and "Auto Submit" to send data to Sales Force.

 

I can send the emails, but the problem is  LeadSource field on SF is not filled due to the 'Auto Submit'. 

 

Is there anyway I can fill the LeadSource field on Page2, since I dont want to put the SF information on Page1 which can be easily accesible to anyone.

 

I am using ASP.net and VB.

 

Thanks,

Can anyone recommend the best approach for assigning Leads to Campaigns without using a Web-to-Lead form? I have a .NET/C# website with multiple campaigns on it and I don't want  the visitors to have to fill out a form every single time.  

JS Remoting works fine in a managed package within Visualforce pages.

 

However, when moving the @RemoteAction to an extension for an inline VF page, it stops working. Example code taken directly from this HOWTO article.

 

The remoting action silently fails to console log with the following error messages:

Controller not found for 'IO.LineItemRemotingExtension' VFRemote.js:114
Unable to invoke action 'IO.LineItemRemotingExtension.getAccountRemote': no controller and/or function found VFRemote.js:114
$VFRM.Util.error VFRemote.js:114
$VFRM.ProviderManager.VFExt3.extend.invokeAction VFRemote.js:134
getRemoteAccount servlet.Integration:19
onclick

 

Visualforce Page (inline)

<apex:page showHeader="false" sidebar="false" standardController="Order__c" extensions="LineItemRemotingExtension" standardstylesheets="true">

<head>  
	<script type="text/javascript">
	function getRemoteAccount() {
		var accountName = document.getElementById('acctSearch').value;
		
		Visualforce.remoting.Manager.invokeAction(
			'{!$RemoteAction.LineItemRemotingExtension.getAccountRemote}',
			accountName, 
			function(result, event){
				if (event.status) {
					// Get DOM IDs for HTML and Visualforce elements like this
					document.getElementById('remoteAcctId').innerHTML = result.Id
					document.getElementById(
						"{!$Component.block.blockSection.secondItem.acctType}"
					).innerHTML = result.Type;
				} else if (event.type === 'exception') {
					document.getElementById("responseErrors").innerHTML = 
						event.message + "<br/>\n<pre>" + event.where + "</pre>";
				} else {
					document.getElementById("responseErrors").innerHTML = event.message;
				}
			}, 
			{escape: true}
		);
	}
	</script>
</head>

<input id="acctSearch" type="text"/>
<button onclick="getRemoteAccount()">Get Account</button>
<div id="responseErrors"></div>

<apex:pageBlock id="block">
	<apex:pageBlockSection id="blockSection" columns="2">
		<apex:pageBlockSectionItem id="firstItem">
			<span id="remoteAcctId"/>
		</apex:pageBlockSectionItem>
		<apex:pageBlockSectionItem id="secondItem">
			<apex:outputText id="acctType"/>
		</apex:pageBlockSectionItem>
	</apex:pageBlockSection>
</apex:pageBlock>

 

Apex Controller Extension

global with sharing class LineItemRemotingExtension {	
	private final Order__c m_order;
	
	public LineItemRemotingExtension(ApexPages.StandardController stdController) {
		String oid = stdController.getRecord().Id;
		this.m_order = Database.query('SELECT ' + Order.SFIELDS + ' FROM Order__c WHERE Id=:oid LIMIT 1');
	}
	
	@RemoteAction
	global static Account getAccountRemote(String accountName) {
		return [SELECT Id, Name, Phone, Type, NumberOfEmployees 
			FROM Account WHERE Name = :accountName];
	}
}

 

Tried replacing the call to {!$RemoteAction.LineItemRemotingExtension.getAccountRemote} with just plain 
RemoteAction.LineItemRemotingExtension.getAccountRemote

-and-
IO.RemoteAction.LineItemRemotingExtension.getAccountRemote

 

But neither option works. It doesn't appear to be a managed package namespace issue, but more like a controller extension related anomoly. 

 

Any one else encountered this, or have thoughts/suggestions?

 

Thanks!

 

-Mike

 

Edit: Per Josh's suggestion, I've tried binding directly to the controller extension name/method, bypassing invokeMethod. This this also does not work, throwing different exceptions with and without namespace prefix. Examples below:

 

<script type="text/javascript">
	function getRemoteAccount() {
		var accountName = document.getElementById('acctSearch').value;
		
		LineItemRemotingExtension.getAccountRemote(accountName, 
			function(result, event){
				if (event.status) {
					alert("success");
				} else if (event.type === 'exception') {
					alert(event.message);
				} else {
					alert(event.message);
				}
			}, 
			{escape: true}
		);
	}
</script>

 

 Exception: Uncaught ReferenceError: LineItemRemotingExtension is not defined servlet.Integration:19

    1. getRemoteAccountservlet.Integration:19
    2. onclick

 

With namespace prefix:

 

IO.LineItemRemotingExtension.getAccountRemote

Exception: Uncaught TypeError: Cannot call method 'getAccountRemote' of undefined servlet.Integration:19

    1. getRemoteAccount servlet.Integration:19
    2. onclick



DocuSign for Salesforce is one of the leading AppExchange applications available for Salesforce.

 

DocuSign has an immediate opening for a Software Engineer to help take their Salesforce AppExchange integration to the next level.

 

Job details

 

* Work with a variety of cloud technologies (Apex, VF, node.js, JQuery, REST APIs, JSON)

* Great location in downtown San Francisco near Salesforce HQ

* Fast growing company. World standard in eSignature

 

Review more details and apply online.

Trying to move code between 2 development edition orgs using ant-salesforce.jar (v25) and receiving this error on a class generated by Apex2WSDL.

 

Error: Cannot reduce the global visibility of interface method: Integer compareTo(Object) from Comparable

 

The target org is still on Summer '12 v25. Verified the meta version for this class is also v25.

 

The code in question was auto-generated by Apex2WSDL. The outer class is public (not global) as is the inner class implementing comparable.

 

Did something change recently requiring that interfaces be global?

 

Any thoughts, suggestion, ideas on how to resolve this error?

 

Thanks!

(Note: this position is onsite at Facebook's HQ campus in Menlo Park, CA)
 

Are you an experienced Sales Cloud / Force.com Developer that likes to think "outside the box" and create innovative, new applications on the Force.com platform?
 

Facebook is looking for experienced Developers to build Sales Cloud business applications that power the world's largest social advertising network.


The following technologies and skills are required:

  • Experienced with Account/Contact/Opportunity/Pipeline management
  • Contract and Order Management
  • Object Oriented Design and Development
  • Strong Apex and Visualforce Coding
  • HTML5 / Javascript / Ajax

Experience with advertising, marketing, or media sales nice to have.


Work Environment

  • Must be able to work onsite at Facebook's HQ campus in Menlo Park, CA 
  • Contract or Full Time
  • Fllexible contract terms (3-12 months)
  • $100+ Per Hour (DOE)
  • Awesome food
  • Fast growing technology/media company environment

Please contact Mike Leach <mleach@fb.com> 

Are you an experienced Force.com Developer that likes to think "outside the box" and create new applications on the Force.com platform?
 

Facebook is looking for experienced Developers to build Force.com business applications that power the world's largest social network.


The following technologies and skills are required:

  • Force.com Platform
  • Object Oriented Design and Development
  • Strong Apex and Visualforce Coding
  • HTML5 / Javascript / Ajax

Experience with Service Cloud (ticketing), inventory management, or supply chain nice to have.


Work Environment

  • Contract or Full Time
  • Fllexible contract terms (6-9 months)
  • $100+ Per Hour
  • Awesome food :-)
  • Fast growing technology company environment

Please contact Joshua Chaisson <joshuac@fb.com> or Daniel Soosai <dsoosai@fb.com>

Join a team that is developing business applications for the worlds largest social network. Facebook has a few job openings for Force.com Developers in Palo Alto, CA.

 

Benefits:

  • Access to all the latest Salesforce tools, training, and features
  • Free food
  • Hackathons
  • Competitive salary
  • Healthcare
  • Vacations
  • Plus dozens of other cool perks

Click here to learn more and apply: https://www.facebook.com/careers/department.php?dept=IT&req=387184410968

 

Facebook is building some amazing apps on Salesforce. This is the gig to be working on right now.

 

Join our team as a Salesforce Application Developer and help drive the fastest growing site on the web.

 

-Mike

 

(Contact me for details or a referral)

 

 

Is it possible to migrate Custom Setting objects using the migration toolkit and ant?

 

Calling "describeMetadata" does not itemize a CustomSetting metadata component option.

 

Thanks!

 

-Mike

 

I have several *.cls files that use space indentation and need converting to tabs.

 

The Java perspective in Eclipse has options for auto-formatting Java files, but I've been unable to apply this towards to Apex class files.

 

Any thoughts or guidance on how to do this? Maybe a magic plug-in somewhere?

 

Thx!

 

-Mike

 

Would it be possible to update the Web Services Quick Start guide to reflect use of Axis 1.4?

 

The current documentation is written for Axis 1.3, which no longer appears to be supported. The WSDL generation steps make reference to JARs that are no longer available.

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_quickstart_steps.htm

 

Thanks!

 

-Mike

 

 

How do I retrieve all custom fields on a standard object using the Migration Toolkit Metadata API?

 

The migration tool guide provides this markup for retrieving standard objects (SO), but indicates that custom fields on SOs must be retrieved individually.

 

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account</members>
        <name>CustomObject</name>
    </types>
    <version>19.0</version>
</Package>

I'm looking for more of a wildcard approach to retrieve all fields. My goal is to run an Ant script daily to retrieve and backup all metadata. Is this possible?

 

Running all tests in Salesforce shows 91% test coverage, yet the package upload wizard says only 52% and fails to package.

 

Not a single class falls under 78%.... most are 100%.

 

What would cause this?

 

 

 

 

Thanks

 

-Mike

 

 

Is there anyway to declare a customizable parameter in Visualforce that can be read from the controller?

 

The controller is a managed package global class that (ideally) derives behavior from declarative config values in the VF page template.

 

Something like:

 

<apex:Page controller="myController">
    <apex:??? value="foo" id="myParam" />
</apex:Page>

global class myController(){
   public myController(){
      string configParam = myParam.value;
      if(configParam == 'foo'){
         //do this
      }
      else{
         //do something else
      }
   }
}

 

 

 

 

We're using core.apexpages.devmode.url=1 in an application intended for packaging on the AppExchange.

 

Will using this setting expose an app to Cross Site Scripting attacks? Will the AppExchange security team reject any apps using this request parameter?

 

Thanks!

 

-Mike

 

 

I want to give verified NPO installations free access to an externally hosted resource during package installation.

 

Is there a way to programmatically determine through the API, by OrgId or other metadata, if the subscribing org is a non-profit?

 

 

Thanks

 

-Mike 

Is there a way to create generic sObjects in Apex? I'm looking for an equivalent to this:

string lateBoundType = 'MyCustomObject__c';

 

sObject obj = new sObject();

obj.Type = lateBoundType;

 

XmlDoc fields = //Create fields XML here

obj.Any = fields;

 

obj.Create();

 

Thanks!

 

-Mike

 

 

 

I want to distribute a custom component in a managed package.

 

Can I give subscribers the ability to customize the HTML layout of the component?

 

If not, can IP protection be disabled on a component? 

 

 

Thanks!

 

-Mike 

 

 

Binaries + C# source posted to Codeplex at http://passage.codeplex.com/ 

 

Requires

 

  • SQL Server 2008
  • .NET 3.5
  • IIS 6 or 7 
 

 

I can't seem to locate the answer to this one:

 

If an AppExchange Package includes a Visualforce tab and VF page with a custom controller, can it be installed in Professional Edition?

 

Thx!

 

-Mike 

How come I can bind outputText to a global macro like this:

 

<apex:outputText value="The formatted time right now is: {0}">

<apex:param value="{!NOW()}" />

</apex:outputText>

 

But I can't bind to a function on a custom controller like this:

 

<apex:outputText value="The formatted time right now is: {0}">

<apex:param value="{!MyCustomFunction()}" />

</apex:outputText>

 In the second example (above) the error message is

 

Save error: Unknown function MyCustomFunction. Check spelling. 

 

The method is public. Changing it to a property seems to work, but I lose the ability to pass arguments to the function, which is ultimately what I'm trying to achieve.

 

Thanks! 

 

 

 

Hi All,

I'm looking for early adopters and beta testers to help review an open source .NET portal toolkit for Salesforce.com.

An ideal beta tester is:
+ Interested in developing Customer or Partner portal solutions using ASP.NET (C# preferred, but VB.NET supported).

+ Has access to Developer, Enterprise, or Unlimited Edition Account

+ Has access to IIS, .NET 2.0, SQL Server 2005 (Express is alright).


Please contact me at mike@cubiccompass.com if this interests you.

Regards,

Salesforce did a really smart job of hiding all other entries apart from the winning ones. I have done a few hackathons on Challenge Post earlier and this is the *only* one where they are not showing all submissions but only the winning submission in the gallery. While that is food for thought, I feel terrible for myself and some of the other awesome apps that folks built for this hackathon.

 

So, here are the top 5 apps that would have made the finals if I were judging this solely based on the videos I found on YouTube (and I've been doing software development for over 25 years). Just to be unbiased, this does not even include my own submission

 

* Smart
* Chatter Complete
* zip.ly
* Incoming
* Matt Lacey's app (Can't remember the name)

 

If I were to pick the top two, it would be Matt Lacey's app and Chatter Complete. I can't believe how those folks missed out.

 

 

Congrats to Upshot, but they totally didn't follow the official rules of the Hackathon. 

 

 

This was in the official rules:

"The application you or your team submits must: 
... 
• have been developed solely as part of this Hackathon"

 

 

Here is "Upshot" being presented well before the Hackathon was even announced: 
http://www.meetup.com/Salesforce-com-Integration-Analytics/events/136920332/

 

Quite a farce.

  • November 22, 2013
  • Like
  • 0

Hello,

 

I was searching for what others are buliding and saw this app. While it looks good, I don't think this meets the requirements mentioned-

 

"Participants may begin forming their teams and working on their entry (each, an
“Entry” and, together, the “Entries”) as early as October 25, 2013. Each Entry
shall consist of a mobile application with a link to the working source code, the
application login credential, a written description and a brief demo video. Entries
must be completed and submitted between November 19, 2013 at 2:01 pm PST
and November 20, 2013 at 6:00 pm PST."

 

This app is available on App Store since Oct 25 - https://itunes.apple.com/us/app/logalytics-for-salesforce/id694548466

 

Which clearly means that it was built prior to the hackathon announcement and should not be qualified as valid for hackathon. I have one similar app which I built a while back and put on app store but I'm writing another one from scratch just to comply with the rules.

 

Further, it looks like this guy Mike Leach is a Force.com MVP and works with Facebook. Even his MVP profile mentions the app - http://developer.force.com/mvp_profile_mike

 

No hard feelings but I do think this app should not be eligible.

 

May the best app win!

JS Remoting works fine in a managed package within Visualforce pages.

 

However, when moving the @RemoteAction to an extension for an inline VF page, it stops working. Example code taken directly from this HOWTO article.

 

The remoting action silently fails to console log with the following error messages:

Controller not found for 'IO.LineItemRemotingExtension' VFRemote.js:114
Unable to invoke action 'IO.LineItemRemotingExtension.getAccountRemote': no controller and/or function found VFRemote.js:114
$VFRM.Util.error VFRemote.js:114
$VFRM.ProviderManager.VFExt3.extend.invokeAction VFRemote.js:134
getRemoteAccount servlet.Integration:19
onclick

 

Visualforce Page (inline)

<apex:page showHeader="false" sidebar="false" standardController="Order__c" extensions="LineItemRemotingExtension" standardstylesheets="true">

<head>  
	<script type="text/javascript">
	function getRemoteAccount() {
		var accountName = document.getElementById('acctSearch').value;
		
		Visualforce.remoting.Manager.invokeAction(
			'{!$RemoteAction.LineItemRemotingExtension.getAccountRemote}',
			accountName, 
			function(result, event){
				if (event.status) {
					// Get DOM IDs for HTML and Visualforce elements like this
					document.getElementById('remoteAcctId').innerHTML = result.Id
					document.getElementById(
						"{!$Component.block.blockSection.secondItem.acctType}"
					).innerHTML = result.Type;
				} else if (event.type === 'exception') {
					document.getElementById("responseErrors").innerHTML = 
						event.message + "<br/>\n<pre>" + event.where + "</pre>";
				} else {
					document.getElementById("responseErrors").innerHTML = event.message;
				}
			}, 
			{escape: true}
		);
	}
	</script>
</head>

<input id="acctSearch" type="text"/>
<button onclick="getRemoteAccount()">Get Account</button>
<div id="responseErrors"></div>

<apex:pageBlock id="block">
	<apex:pageBlockSection id="blockSection" columns="2">
		<apex:pageBlockSectionItem id="firstItem">
			<span id="remoteAcctId"/>
		</apex:pageBlockSectionItem>
		<apex:pageBlockSectionItem id="secondItem">
			<apex:outputText id="acctType"/>
		</apex:pageBlockSectionItem>
	</apex:pageBlockSection>
</apex:pageBlock>

 

Apex Controller Extension

global with sharing class LineItemRemotingExtension {	
	private final Order__c m_order;
	
	public LineItemRemotingExtension(ApexPages.StandardController stdController) {
		String oid = stdController.getRecord().Id;
		this.m_order = Database.query('SELECT ' + Order.SFIELDS + ' FROM Order__c WHERE Id=:oid LIMIT 1');
	}
	
	@RemoteAction
	global static Account getAccountRemote(String accountName) {
		return [SELECT Id, Name, Phone, Type, NumberOfEmployees 
			FROM Account WHERE Name = :accountName];
	}
}

 

Tried replacing the call to {!$RemoteAction.LineItemRemotingExtension.getAccountRemote} with just plain 
RemoteAction.LineItemRemotingExtension.getAccountRemote

-and-
IO.RemoteAction.LineItemRemotingExtension.getAccountRemote

 

But neither option works. It doesn't appear to be a managed package namespace issue, but more like a controller extension related anomoly. 

 

Any one else encountered this, or have thoughts/suggestions?

 

Thanks!

 

-Mike

 

Edit: Per Josh's suggestion, I've tried binding directly to the controller extension name/method, bypassing invokeMethod. This this also does not work, throwing different exceptions with and without namespace prefix. Examples below:

 

<script type="text/javascript">
	function getRemoteAccount() {
		var accountName = document.getElementById('acctSearch').value;
		
		LineItemRemotingExtension.getAccountRemote(accountName, 
			function(result, event){
				if (event.status) {
					alert("success");
				} else if (event.type === 'exception') {
					alert(event.message);
				} else {
					alert(event.message);
				}
			}, 
			{escape: true}
		);
	}
</script>

 

 Exception: Uncaught ReferenceError: LineItemRemotingExtension is not defined servlet.Integration:19

    1. getRemoteAccountservlet.Integration:19
    2. onclick

 

With namespace prefix:

 

IO.LineItemRemotingExtension.getAccountRemote

Exception: Uncaught TypeError: Cannot call method 'getAccountRemote' of undefined servlet.Integration:19

    1. getRemoteAccount servlet.Integration:19
    2. onclick



Trying to move code between 2 development edition orgs using ant-salesforce.jar (v25) and receiving this error on a class generated by Apex2WSDL.

 

Error: Cannot reduce the global visibility of interface method: Integer compareTo(Object) from Comparable

 

The target org is still on Summer '12 v25. Verified the meta version for this class is also v25.

 

The code in question was auto-generated by Apex2WSDL. The outer class is public (not global) as is the inner class implementing comparable.

 

Did something change recently requiring that interfaces be global?

 

Any thoughts, suggestion, ideas on how to resolve this error?

 

Thanks!

Hi All,

I created one Apex documentation tool just like javadoc. Please share your feedbacks on that.

 

http://www.aslambari.com/apexdoc.html

 

Blog:-

http://techsahre.blogspot.com/2011/01/apexdoc-salesforce-code-documentation.html

 

Thanks

Aslam Bari

  • January 27, 2011
  • Like
  • 1

Would it be possible to update the Web Services Quick Start guide to reflect use of Axis 1.4?

 

The current documentation is written for Axis 1.3, which no longer appears to be supported. The WSDL generation steps make reference to JARs that are no longer available.

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_quickstart_steps.htm

 

Thanks!

 

-Mike

 

 

Running all tests in Salesforce shows 91% test coverage, yet the package upload wizard says only 52% and fails to package.

 

Not a single class falls under 78%.... most are 100%.

 

What would cause this?

 

 

 

 

Thanks

 

-Mike

 

 

Is there anyway to declare a customizable parameter in Visualforce that can be read from the controller?

 

The controller is a managed package global class that (ideally) derives behavior from declarative config values in the VF page template.

 

Something like:

 

<apex:Page controller="myController">
    <apex:??? value="foo" id="myParam" />
</apex:Page>

global class myController(){
   public myController(){
      string configParam = myParam.value;
      if(configParam == 'foo'){
         //do this
      }
      else{
         //do something else
      }
   }
}

 

 

 

 

I have a huge visualforce controller. The page it controls It has grown beyond what I ever imagined in terms of scope and features. Due to the massive amount of features and requirements I have hit the 100K character class limit. I think I can address this limit with class inheritance but please confirm I am doing this correctly.

 

"Parent" class. In this class I could store all variables, wrapper classes, and methods that are invoked from the constructor on initial page load

 

public virtual class Parent{

    public String input {get; set;}

    public Parent(){
        //Do initializations required on page load in this contructor, not child constructor.
        init();
    }
    
    public void init(){
        system.debug('Power up systems for launch!');
    }

    public void doSomethingParent(){
        system.debug('hi from parent');
    }
    
    public class wrapperClass{
        public String Name {get; set;}
    }
}

 

 

Child class that extends parent. Would contain mostly action methods called from page.

 

public class Child extends Parent{

    public void doSomethingChild(){
        system.debug('hi from child');
        doSomethingParent();
        WrapperClass test = new WrapperClass();
    }
}

 And the page which sets the controller as the "child" class. This way it can call methods in both classes.

 

<apex:page controller="Child" >
    <apex:form >
        <apex:commandButton value="Parent" action="{!doSomethingParent}"/>
        <apex:commandButton value="Child" action="{!doSomethingChild}"/>
    </apex:form>
</apex:page>

 

 

Does everything look good here. Am I following best practices?

 

Thanks,

Jason

 

Keyword: script too large

 

  • April 30, 2010
  • Like
  • 1

Hy,

 

after spending hours on the discussion boards I am totally confused on how to build a visualforce site where arbitrary users can login.

 

I am trying to build a recruiting app, where job applicants get access to their own password-protected profile page. Their profile is stored inside a custom object.

 

I thought, that's exactly what site are for, but from the boards I fear that authentication is only possible for real users in the system. And you have to pay for each user in the system....

As I expect hundreds of job applications that's not what I want.

My next idea was to create a self-made login mechanism that would pseudo login people based on a single portal user. But it seems this not allowed by Salesforce licenses.

 

So what could I do?!! Your help is much appreciated.

 

I am trying to query records and getting error : System.Exception: retrieve id limit reached.

 

What does this mean and how can this be resolved?

 

Suggestions please? 

  • March 15, 2010
  • Like
  • 0