• andy21aa
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hi,

Iam trying to use http POST request to enter data from salesforce to external system.  My WSDl file contans below soapAction

-<wsdl:operation name="AddCustomerData">
<soap12:operation style="document" soapAction="http://xxxx.org/WebServices/AddCustomerData"/>

Salesforce doesnot support SOAP 1.2 , so does that mean i cannot use the webservices for POSt operation too? The WSDL file i got only has SOAP12 operations. How can make it work so that i can use webservices to POST and GET data.

Thanks
I have my trigger and class working but i am only gettng 71% but not sure why

the class

@isTest 
public class FOP{

static testMethod Void Contacttoupdatedailycontact(){

contact sContact= new contact();
sContact.job__C= 'a013000000UHggN';
sContact.FirstName='Thomas';
sContact.LastName='Monson';
sContact.Field_Of_Play__C='Daily Contact';



Test.startTest();
sContact.job__C= 'a013000000UHggN';
sContact.Id = '00330000012mk3O';
update sContact;

Test.StopTest();
}
}


the trigger

trigger Contacttoupdatedailycontact on Contact (after insert,after update) {
    set<id> jobids=new set<id>();
    for(contact c:trigger.new){
      jobids.add(c.Job__c) ;
    }
    map<id,jobs__c> jobsmap=new map<id,jobs__c>([select id,DailyContact__c from jobs__c where id=:jobids]);
    jobs__c tempjob=new jobs__c();
    list<jobs__c> joblist=new list<jobs__c>();
    for(contact c2:trigger.new){
      Contact oldc2=trigger.oldmap.get(c2.Id);
    
      if(c2.Field_of_Play__c!=oldc2.Field_of_Play__c && c2.Field_of_Play__c=='Daily Contact'){
          system.debug('entered if loop');
          if(jobsmap.containsKey(c2.Job__c)){
              tempjob=jobsmap.get(c2.Job__c);
              tempjob.DailyContact__c=c2.FirstName+' '+c2.LastName;
              joblist.add(tempjob);
           
          }
        }
            }
        update joblist;
}
Hello There,
I am novice in Salesforce.
I am having two Objects Property__c and Contacts(In My Case it is Buyer), I am establishing many-2-many relationship between these two Objects with a Juction Object as 'PropertyBuyer__c'. I want after any property is saved filter Contacts from database(depends upon the criteria) and create a new record in Junction Object 'PropertyBuyer__c'
Following is my code
trigger Rename on Property__c (Before Insert, Before Update) {
   
    list<id> contactids = new list<id>();
    list<PropertyBuyer__c> property_buyer_list = new list<PropertyBuyer__c>();
    Decimal prop_price;
    String prop_city;
    for(Property__c prop_obj:Trigger.new)
    {
        prop_price = prop_obj.Price__c;
        prop_city = prop_obj.City__c;
        contactids = [SELECT id FROM Contacts WHERE Budget_From__c >= prop_price AND Budget_To__c <= prop_price AND City__c = prop_city];
        for(id con_id:contactids)
        {
            PropertyBuyer__c PB_obj = new PB_obj();
            PB_obj.Name = prop_obj.Name;
            PB_obj.Contact__c = con_id;
            PB_obj.Property__c = prop_obj.id;
            property_buyer_list.Add(PB_obj);
        }
    }
    Insert property_buyer_list;
}

But I am gettign following error Error: Compile Error: unexpected token: 'prop_price' at line 11 column 70
Please Help me soon

Thanks & Regards
Madhusudan Singh