• dragan loncar
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 2
    Replies
Hi  
I wanted  to update  field membership status in  object  contact   using this       contact.Membership_Status__c = "Approved";
when i open  object concta i can see  field membership Status has formula:
text( Latest_Membership__r.Membership_Status__c )
I am gettinh error 
The error returned was Unable to create/update fields: Membership_Status__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set. 
The  fields without formula i can update 
Please help 
 
Hi  
I wanted  to update  field membership status in  object  contact   using this       contact.Membership_Status__c = "Approved";
when i open  object contact i can see  field membership Status has formula:
text( Latest_Membership__r.Membership_Status__c )
I am gettinh error 
The error returned was Unable to create/update fields: Membership_Status__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set. 
​The  fields without formula i can update 
Please help 
 
Hi  
I wanted  to update  field membership status in  object  contact   using this       contact.Membership_Status__c = "Approved";
when i open  object concta i can see  field membership Status has formula:
text( Latest_Membership__r.Membership_Status__c )
I am gettinh error 
The error returned was Unable to create/update fields: Membership_Status__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set. 
The  fields without formula i can update 
Please help 

 

 PLEASE HELP
I am using  SOAP  and want  to call  web service   from salesforces   to  update table using WebServiceCallout
i create  WEB SERVICE file in visual studio
namespace WebApplication79
{
    /// <summary>
    /// Summary description for WebService1
    /// </summary>
    [WebService(Namespace = "http://step23.ca")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class WebService1 : System.Web.Services.WebService
    {

        [WebMethod]
        public void updatedatabase()
        {
            string constr = ConfigurationManager.ConnectionStrings["strconnection"].ConnectionString;
            SqlConnection con = new SqlConnection(constr);

            SqlCommand comm = new SqlCommand();
            comm.CommandText = "Insert into Branch(branch) values('dragan')";
           
            con.Open();
            comm.Connection = con;
            comm.ExecuteNonQuery();
            con.Close();


            //  return "Hello World";
        }
    }
}
after that  i  generate  apex class from wsdl
//Generated by wsdl2apex

public class step23Ca {
    public class updatedatabaseResponse_element {
        private String[] apex_schema_type_info = new String[]{'http://step23.ca','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class updatedatabase_element {
        private String[] apex_schema_type_info = new String[]{'http://step23.ca','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class WebService1Soap {
        public String endpoint_x = 'http://184.154.149.230/WebService1.asmx';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://step23.ca', 'step23Ca'};
        public void updatedatabase() {
            step23Ca.updatedatabase_element request_x = new step23Ca.updatedatabase_element();
            step23Ca.updatedatabaseResponse_element response_x;
            Map<String, step23Ca.updatedatabaseResponse_element> response_map_x = new Map<String, step23Ca.updatedatabaseResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://step23.ca/updatedatabase',
              'http://step23.ca',
              'updatedatabase',
              'http://step23.ca',
              'updatedatabaseResponse',
              'step23Ca.updatedatabaseResponse_element'}
            );
            response_x = response_map_x.get('response_x');
        }
    }
}
and  I   cretae  trigger 
trigger AdoDetailTrigger on members__c (before update,after update) {
List<members__c> pcsDetail = [Select Id,firstname__c From members__c Where Id IN :Trigger.new];

//Set<Id> resultIds = (new Map<Id,SObject>(pcsDetail)).keySet();
InvokeWebServiceOnAdoptionStatusChange.callWebService();
}
and call class  to call  web service 
public class InvokeWebServiceOnAdoptionStatusChange {

       @future(callout=true)
        public static void callWebService() {
        try {            
        step23Ca.WebService1Soap x = new step23Ca.WebService1Soap();
            x.updatedatabase();          
        }
        catch(System.AsyncException e) {
            System.debug('Exception' +e);    
        }
    }
}
WHEN I RUNNING CODE    NOTHING  HAPPENED IN DATABASE  TO UPDATE  RECORD
what i am doing wrong 
PLEASE HELP  please 
regards
HI
What  i doing wrong  PLEASE HELP
I am using  SOAP  and want  to call  web service   from salesforces   to  update table using WebServiceCallout
i create  WEB SERVICE file in visual studio
namespace WebApplication79
{
    /// <summary>
    /// Summary description for WebService1
    /// </summary>
    [WebService(Namespace = "http://step23.ca")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class WebService1 : System.Web.Services.WebService
    {

        [WebMethod]
        public void updatedatabase()
        {
            string constr = ConfigurationManager.ConnectionStrings["strconnection"].ConnectionString;
            SqlConnection con = new SqlConnection(constr);

            SqlCommand comm = new SqlCommand();
            comm.CommandText = "Insert into Branch(branch) values('dragan')";
           
            con.Open();
            comm.Connection = con;
            comm.ExecuteNonQuery();
            con.Close();


            //  return "Hello World";
        }
    }
}
after that  i  generate  apex class from wsdl
//Generated by wsdl2apex

public class step23Ca {
    public class updatedatabaseResponse_element {
        private String[] apex_schema_type_info = new String[]{'http://step23.ca','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class updatedatabase_element {
        private String[] apex_schema_type_info = new String[]{'http://step23.ca','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class WebService1Soap {
        public String endpoint_x = 'http://184.154.149.230/WebService1.asmx';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://step23.ca', 'step23Ca'};
        public void updatedatabase() {
            step23Ca.updatedatabase_element request_x = new step23Ca.updatedatabase_element();
            step23Ca.updatedatabaseResponse_element response_x;
            Map<String, step23Ca.updatedatabaseResponse_element> response_map_x = new Map<String, step23Ca.updatedatabaseResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://step23.ca/updatedatabase',
              'http://step23.ca',
              'updatedatabase',
              'http://step23.ca',
              'updatedatabaseResponse',
              'step23Ca.updatedatabaseResponse_element'}
            );
            response_x = response_map_x.get('response_x');
        }
    }
}
and  I   cretae  trigger 
trigger AdoDetailTrigger on members__c (before update,after update) {
List<members__c> pcsDetail = [Select Id,firstname__c From members__c Where Id IN :Trigger.new];

//Set<Id> resultIds = (new Map<Id,SObject>(pcsDetail)).keySet();
InvokeWebServiceOnAdoptionStatusChange.callWebService();
}
and call class  to call  web service 
public class InvokeWebServiceOnAdoptionStatusChange {

       @future(callout=true)
        public static void callWebService() {
        try {            
        step23Ca.WebService1Soap x = new step23Ca.WebService1Soap();
            x.updatedatabase();          
        }
        catch(System.AsyncException e) {
            System.debug('Exception' +e);    
        }
    }
}
WHEN I RUNNING CODE    NOTHING  HAPPENED IN DATABASE  TO UPDATE  RECORD
what i am doing wrong 
PLEASE HELP  please 
regards
What  i doing wrong  PLEASE HELP
I am using  SOAP  and want  to call  web service   from salesforces   to  update table using WebServiceCallout
i create  WEB SERVICE file in visual studio
namespace WebApplication79
{
    /// <summary>
    /// Summary description for WebService1
    /// </summary>
    [WebService(Namespace = "http://step23.ca")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class WebService1 : System.Web.Services.WebService
    {

        [WebMethod]
        public void updatedatabase()
        {
            string constr = ConfigurationManager.ConnectionStrings["strconnection"].ConnectionString;
            SqlConnection con = new SqlConnection(constr);

            SqlCommand comm = new SqlCommand();
            comm.CommandText = "Insert into Branch(branch) values('dragan')";
           
            con.Open();
            comm.Connection = con;
            comm.ExecuteNonQuery();
            con.Close();


            //  return "Hello World";
        }
    }
}
after that  i  generate  apex class from wsdl
//Generated by wsdl2apex

public class step23Ca {
    public class updatedatabaseResponse_element {
        private String[] apex_schema_type_info = new String[]{'http://step23.ca','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class updatedatabase_element {
        private String[] apex_schema_type_info = new String[]{'http://step23.ca','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class WebService1Soap {
        public String endpoint_x = 'http://184.154.149.230/WebService1.asmx';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://step23.ca', 'step23Ca'};
        public void updatedatabase() {
            step23Ca.updatedatabase_element request_x = new step23Ca.updatedatabase_element();
            step23Ca.updatedatabaseResponse_element response_x;
            Map<String, step23Ca.updatedatabaseResponse_element> response_map_x = new Map<String, step23Ca.updatedatabaseResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://step23.ca/updatedatabase',
              'http://step23.ca',
              'updatedatabase',
              'http://step23.ca',
              'updatedatabaseResponse',
              'step23Ca.updatedatabaseResponse_element'}
            );
            response_x = response_map_x.get('response_x');
        }
    }
}
and  I   cretae  trigger 
trigger AdoDetailTrigger on members__c (before update,after update) {
List<members__c> pcsDetail = [Select Id,firstname__c From members__c Where Id IN :Trigger.new];

//Set<Id> resultIds = (new Map<Id,SObject>(pcsDetail)).keySet();
InvokeWebServiceOnAdoptionStatusChange.callWebService();
}
and call class  to call  web service 
public class InvokeWebServiceOnAdoptionStatusChange {

       @future(callout=true)
        public static void callWebService() {
        try {            
        step23Ca.WebService1Soap x = new step23Ca.WebService1Soap();
            x.updatedatabase();          
        }
        catch(System.AsyncException e) {
            System.debug('Exception' +e);    
        }
    }
}
WHEN I RUNNING CODE    NOTHING  HAPPENED IN DATABASE  TO UPDATE  RECORD
what i am doing wrong 
PLEASE HELP  please 
regards
Hi
I am using integrafion salesforces with c# .I established connection  salesforces with C  using WSDL
I want to update   last name  where firstname =d
please  help 
That  is my code  SOAP
String soqlQuery = "SELECT firstname__c,lastname__c FROM members__c where   firstname__c='d'";
            QueryResult qr = binding.query(soqlQuery);
in this record i want to update  lastname__c
PLEASE HELP 
 
Hi
I am using integrafion salesforces with c# .I established connection  salesforces with C  using WSDL
I want to update   last name  where firstname =d
please  help 
That  is my code  SOAP
String soqlQuery = "SELECT firstname__c,lastname__c FROM members__c where   firstname__c='d'";
            QueryResult qr = binding.query(soqlQuery);
in this record i want to update  lastname__c
PLEASE HELP 
 
When i update a picklist value from 'Requested' to 'Approved' then it should invoke a trigger which in turn calls an external web service (.net web application) and pass those data of the updated record along with it and those records should be received by the .net application and saved on sql server database. I am totally new to Salesforce and Web service.

Trigger,
trigger AdoDetailTrigger on PCS_Detail__c (after update)
{
List<PCS_Detail__c> pcsDetail = [Select Id,Tracking_Details__c From PCS_Detail__c Where Id IN :Trigger.new]; if(pcsDetail[0].Tracking_Details__c == 'Approved')
{
Set<Id> resultIds = (new Map<Id,SObject>(pcsDetail)).keySet();
InvokeWebServiceOnStatusChange.callWebService(resultIds);
}
}

Apex class future callout,
public class InvokeWebServiceOnStatusChange
{
@future(callout=true)
public static void callWebService(Set<Id> resultIds)
{
try
{
List<PCS_Detail__c> pcsDetail = [Select Name__r.Id,Name__r.Name,Name__r.Breed__c,Name__r.Species__c,Name__r.Gender__c From PCS_Detail__c Where Id IN :resultIds];
NewPetInformation.PackageServiceSoap obj = new NewPetInformation.PackageServiceSoap();
obj.UpdateDatabase(pcsDetail);
}
catch(System.AsyncException e)
{
System.debug('Exception' +e);
}
}

.NET web method,
[WebMethod]
public void UpdateDatabase(List<PCSDetail> values)
{
SqlConnection constr = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString);
SqlCommand comm = new SqlCommand();
comm.CommandText = "Insert into PetInformation(Id,Name,Breed,Species,Gender) values(@p0,@p1,@p2,@p3,@p4)"; comm.Parameters.AddWithValue("@p0", values[0].Id); comm.Parameters.AddWithValue("@p1", values[0].Name); comm.Parameters.AddWithValue("@p2", values[0].Breed); comm.Parameters.AddWithValue("@p3", values[0].Species); comm.Parameters.AddWithValue("@p4", values[0].Gender);
comm.Connection = constr;
comm.ExecuteNonQuery();
}

Model,
public class PCSDetail
{
public string Id { get; set; }
public string Name { get; set; }
public string Breed { get; set; }
public string Species { get; set; }
public string Gender { get; set; }
}

After generating WSDL and parsed the WSDL into apex classes when i save the apex class which calls the web service, i get the error saying 

Method does not exist or incorrect signature: [NewPetInformation.PackageServiceSoap].UpdateDatabase(List). How to solve this.
http://salesforce.stackexchange.com/questions/115453/web-service-callout-from-salesforce-to-net-using-soap
  • March 25, 2016
  • Like
  • 0