• Sriurs444
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Hi,

 

Can you please anyone help me on the below trigger.

 

We are trying to update the Federation Identifier Field (On User Object) from one Custom Object  SAPCode__c. There is a field called PeopleKey __c.

 

When we creating a new user or updating a user record, we have to update the Federation Identifier on the User Object from Custom Object A ( Field in SAPcode__c as Peoplekey__c).

 

Here is the trigger code:

 

trigger PopulateFederationId on User (before insert, before update)
{
 
    Set<id> setsapcodeids = new Set<id>();
    for(User u : trigger.new)
   {
         if(u.email!= null)
         {
          setsapcodeids.add(u.id);
         }
   }

 MAP<ID,SAPCode__c> mapSAPCode = new MAP<ID , SAPCode__c>([Select Enterprise_Id__c, PeopleKey__c, Email__c from SAPCode__c where id in: setsapcodeids Limit 1]);
system.debug('####' + mapSAPCode.size() + '- user counts:' + setsapcodeids.size());
   for(User u : Trigger.new)
   {
       if(mapSAPCode.containsKey(u.email))
       {
          SAPCode__c  sc = mapSAPCode.get(u.id);
         
          if(sc.email__c == u.email)
          {
            u.FederationIdentifier = sc.PeopleKey__c;
          }
       }  
            
   }

}

 

I am trying to update it, but, I am not getting any error, but the field is not updating in the User Object.

 

Can anypone please help me onthis.

 

Thanks,

Sridhar.

Hi,

 

Can anyone give the training on Cast Iron Integration Tool?

 

Thanks,

Sri.

Hi..We are performing integration to Sales Force from our legacy applications where we were going to use our Siebel Web Service. In our discovery we found that SalesForce  does not support RPC encoded service  but  only supports document/literal wrapped services. Is there any work around or 3rd party tool that you know of that could be used to help us in this area so we don’t have to re-write those services.

 

I heard Cast Iron is a pretty decent tool for integration. Could anyone let me know how good this tool fits my issue discussed above and any inputs before I recommend this to my organization..?? Please advise. Thanks.