• valentinoromeli
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies
/*This trigger should update a custom object in Saleforce after a User is being updated or inserted
Instead it throws the following exception.
MIXED_DML_OPERATION, DML operation on non-setup object is not supported after you have updated a setup object: SF_User__c: [Id]:
Trigger.UsersTableChangedUpdateSFUserC: line 33, column 20
Who can help me out with this one... Thx in advance.
*/

trigger UsersTableChangedUpdateSFUserC on User (after insert, after update) { if (Trigger.isInsert) { for (User u : Trigger.new) { SF_User__c newUser = new SF_User__c( Username__c = u.Username, Name__c = u.Name, UserId__c = u.Id); insert newUser; } } else { for (Integer i = 0; i < System.Trigger.new.size(); i++) { //get all updates String userID = System.Trigger.new[i].Id; Integer count = [select count() from SF_User__c where UserId__c = :userID]; if (count >0) { //update //SF_User__c updateUser = [select Id, UserId__c, Naam__c, Gebruikersnaam__c from SF_User__c where UserId__c = :userID]; //update updateUser ; } else{ //insert for (User u : Trigger.new) { SF_User__c newUser = new SF_User__c( Username__c = u.Username, Name__c = u.Name, UserId__c = u.Id); insert newUser; } } } } }
I would like to create a Workflow rule for the 'User' object but can't see the 'User'
object in the list.

Anyone?

Regards
How to select the Salesforce Users object in Salesforce when creating a workflow with an outbound message?

Can't see it when creating a workflow.
 
Regards
Is communication between Apex and my .NET web service only possible via SSL?
Howto connect Apex to a .NET web service with a SSL, self-signed certificate?
Any references/pages/examples?
 
Any problems with Authentication?
 
Thanks in advance
 
Howto connect Apex to a .NET web service with a SSL, self-signed certificate?
Any references/pages/examples?
 
Any problems with Authentication?
 
Thanks in advance
 
 
When connecting to my custom web service in Salesforce I retrieve the following message.
 
System.Web.Services.Protocols.SoapHeaderException: No operation available for request.

What does it mean?
 
Thx in advance.
 
 
Hi there,

I generated an APEX class from the following WSDL file - http://sdpws.strikeiron.com/sdpZIPCodeInfo?WSDL from strikeiron.

I then created the following APEX Trigger -

trigger UpdateCounty on Lead (before insert, before update)
{
        for (Lead lead: System.Trigger.new) {
               if (lead.County__c == null){
               wwwStrikeironCom.SDPZipCodesSoap oZipCodeLookup = new wwwStrikeironCom.SDPZipCodesSoap();
               oZipCodeLookup.LicenseInfo = new wsStrikeironCom.LicenseInfo();
               oZipCodeLookup.LicenseInfo.RegisteredUser = new wsStrikeironCom.RegisteredUser();
               oZipCodeLookup.LicenseInfo.RegisteredUser.UserID = 'sanand@kbb.com';
               oZipCodeLookup.LicenseInfo.RegisteredUser.Password = 'sumajee76';
               wwwStrikeironCom.ZipCodeOutput oLookupResult = oZipCodeLookup.GetZipCode(lead.County__c);
               lead.County__c = oLookupResult.ServiceResult.ZipCodes.ZipCodeInfo[1].County;
              
               }
        }
}

I need to be able to automatically populate the COUNTY field under LEADS object based off the info the user enters in the web-to-lead form. That means, the zipcode should be captured and based off this COUNTY field should be updated or filled in the LEADS form.

When I create the new LEAD and enter zipcode - hoping that when this record is saved I would see the COUNTY field uploaded - it gives me this error message;-

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Force.com Sandbox

 

Apex script unhandled trigger exception by user/organization: 005300000010lx0/00DT0000000F6LV

 

UpdateCounty: execution of BeforeInsert

 

caused by: System.CalloutException: Callout from triggers are currently not supported.

 

Class.wwwStrikeironCom.SDPZipCodesSoap.GetZipCode: line 94, column 13

Trigger.UpdateCounty: line 10, column 63

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Any ideas?

Thanks
Hi:
 
Iam getting the below error when i made a call from force.com to external .net web service (.net version 2.0)?
 
Server was unable to read request. ---> There is an error in XML document (12, 6). ---> The specified type was not recognized: n
 
Please help me out how to resolve this?
 
Thanks,
RK
I have a trigger on the Opportunity Object that calls a class. That class then calls another class that makes an HTTP GET request to a Web Service.
 
However I get the error:
 
Callout from triggers are currently not supported.
 
How can I send data to an external Web Service using Apex code? I have read (or am reading) chapter 12 of the reference manual, but obviously missing something.
 
Help please.
 
_t