• StianS
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies

Hi,

 

I have developer login which I use for my sandbox, but I can't log in to Code Share at https://developer.secure.force.com/codeshare/loginpage

 

It says: You are trying to log in with a user ID that is not registered as a developer login. Please try again

 

What to do?

 

-stian 

Hi,

 

just wanted to tell that we've just published a Salesforce integration project for .NET on Google Code.

It is considered ver 0.1 and you're free to download and test in your projects.

 

It's quite simple to use:

 

protected void btnSearchAccount_Click(object sender, EventArgs e) { Account account = new AccountController().GetByName(txtAccountSearch.Text); lblAccountResult.Text = account != null ? account.Name : "No result"; }

 

This is just a beginning of something that can grow. If you want to join the development, please let me know.

 

http://code.google.com/p/salesforce-dotnet/

 

Best regards

Stian 

 

Hi,

struggling with finding any good documentation for this scenario.

Have generated Apex class from an WSDL:

 

public class MembershipService {

public class ArrayOfMembershipUserHelper {

public LIST:MembershipService.MembershipUserHelper MembershipUserHelper;
}

public class FindUsersByEmailResponse_element {

public MembershipService.ArrayOfMembershipUserHelper FindUsersByEmailResult;
}


public class MembershipServiceSoap {

public String clientCert_x;
public String clientCertPasswd_x;
public String endpoint_x;
public MAP:String,String inputHttpHeaders_x;
public MAP:String,String utputHttpHeaders_x;
public Integer timeout_x;

public MembershipService.ArrayOfMembershipUserHelper FindUsersByEmail(String, String){};
}

public class FindUsersByEmail_element {

public String emailToMatch;
public String secret;
}

public class MembershipUserHelper {

public Datetime CreationDate;
public String Email;
public Boolean Newsletter;
public String UserId;
public String Username;
}
}

 Here is an extract from the custom controller that cals the external web service:

 

public class MembershipController {

public List<MembershipService.MembershipUserHelper> members { get; set; }

public MembershipController() {
//this fails, cannot bind
members = getMembers('name@domain.com');
}

public List<MembershipService.MembershipUserHelper> getMembers(string emailToMatch)
{
MembershipService.MembershipServiceSoap svc = new MembershipService.MembershipServiceSoap();
MembershipService.ArrayOfMembershipUserHelper foundUsers = svc.FindUsersByEmail('secretcode', emailToMatch);

return (List<MembershipService.MembershipUserHelper>)foundUsers.MembershipUserHelper;
}

}

 

 

 Here is the markup in the Visualforce page:

<apex:page Controller="MembershipController">
<apex:pageBlock >
<apex:Form >
<apex:dataTable id="listResults" value="{!members}" var="m">
<apex:column value="{!m.Username}"/>
</apex:dataTable>
</apex:Form>
</apex:pageBlock>
</apex:page>

 

When running this, I get an error message saying:

getUsername

 

How do I setup this correct to display a list of the array returning a complex object from the web service?

 

 

 

  • March 09, 2009
  • Like
  • 0
Hi,

what user account should we use when logging in via the API? Should we create an own user called Administrator? Api?
Is it possible to mark the changes the API does with another user than the one currently used?

-Stian
  • January 18, 2008
  • Like
  • 0

Hi,

 

just wanted to tell that we've just published a Salesforce integration project for .NET on Google Code.

It is considered ver 0.1 and you're free to download and test in your projects.

 

It's quite simple to use:

 

protected void btnSearchAccount_Click(object sender, EventArgs e) { Account account = new AccountController().GetByName(txtAccountSearch.Text); lblAccountResult.Text = account != null ? account.Name : "No result"; }

 

This is just a beginning of something that can grow. If you want to join the development, please let me know.

 

http://code.google.com/p/salesforce-dotnet/

 

Best regards

Stian 

 

Hi,

struggling with finding any good documentation for this scenario.

Have generated Apex class from an WSDL:

 

public class MembershipService {

public class ArrayOfMembershipUserHelper {

public LIST:MembershipService.MembershipUserHelper MembershipUserHelper;
}

public class FindUsersByEmailResponse_element {

public MembershipService.ArrayOfMembershipUserHelper FindUsersByEmailResult;
}


public class MembershipServiceSoap {

public String clientCert_x;
public String clientCertPasswd_x;
public String endpoint_x;
public MAP:String,String inputHttpHeaders_x;
public MAP:String,String utputHttpHeaders_x;
public Integer timeout_x;

public MembershipService.ArrayOfMembershipUserHelper FindUsersByEmail(String, String){};
}

public class FindUsersByEmail_element {

public String emailToMatch;
public String secret;
}

public class MembershipUserHelper {

public Datetime CreationDate;
public String Email;
public Boolean Newsletter;
public String UserId;
public String Username;
}
}

 Here is an extract from the custom controller that cals the external web service:

 

public class MembershipController {

public List<MembershipService.MembershipUserHelper> members { get; set; }

public MembershipController() {
//this fails, cannot bind
members = getMembers('name@domain.com');
}

public List<MembershipService.MembershipUserHelper> getMembers(string emailToMatch)
{
MembershipService.MembershipServiceSoap svc = new MembershipService.MembershipServiceSoap();
MembershipService.ArrayOfMembershipUserHelper foundUsers = svc.FindUsersByEmail('secretcode', emailToMatch);

return (List<MembershipService.MembershipUserHelper>)foundUsers.MembershipUserHelper;
}

}

 

 

 Here is the markup in the Visualforce page:

<apex:page Controller="MembershipController">
<apex:pageBlock >
<apex:Form >
<apex:dataTable id="listResults" value="{!members}" var="m">
<apex:column value="{!m.Username}"/>
</apex:dataTable>
</apex:Form>
</apex:pageBlock>
</apex:page>

 

When running this, I get an error message saying:

getUsername

 

How do I setup this correct to display a list of the array returning a complex object from the web service?

 

 

 

  • March 09, 2009
  • Like
  • 0
I created a Salesforce Email Services email address that triggers some Apex Code.  I wanted to enter that email address as a Contact's email address in Salesforce so that I could send stuff to it.  Salesforce email fields do not accept those email addresses in them (ironic).

 Apex Email Error When Saving a Contact

For now, I am keeping it as an Outlook contact, but I'd like to sync that Outlook Contact with Salesforce so I always have a safe copy.

Message Edited by hemm on 04-11-2008 12:35 PM
  • April 11, 2008
  • Like
  • 0
One of this issues we have run across while developing code is notifying the correct people when there is an exception in the production environment. Currently, only the code creator receives the email notification but we would like to notify more than one person. What I have done is created a custom object that is populated when an exception occurs. We would then be able to use work flow to notify the correct people.
Code:
trigger triggerName on Object bulk (before insert) {
 
 try{
  //Trigger Code
 }catch(Exception e){
  Apex_Exception__c error = new Apex_Exception__c(
   Name = 'Apex Exception - ' + System.now(),
   Error_Message__c = e.getMessage(),
   Exception_Type__c = e.getTypeName()
  );
   
  insert error;
 } 
}
The shortcoming is that I don't know what trigger and what line caused the exception. Essentially I'd like to re-create the e-mail exception alerts:
Code:
Salesforce Sandbox

Apex script unhandled trigger exception by user/organization: ASDF34ARAFAWF/AF3FAW34FAW4

productEmailAlertsOnOpportunityProducts: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.productEmailAlertsOnOpportunityProducts: line 33, column 26
I looked over the the system methods but didn't see any that returned Trigger Name or more granular error messages. Anyone know how I can approach this?
 




  • August 30, 2007
  • Like
  • 0
Hi all,

Does any one share the experience of directly accessing Salesforce.com Web Services API. I like to access the data via RSS feeds. Any sample code will be appreciated.

Thanks in advance