Hello,
Would anyone have an example of how they are sending PATCH requests to Creatio?
Apparently this does not work, I get the error "{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}"
public static void UpdateThingInCreatio(string section, Guid object, Guid idofyetanotherobject, string text1, string text2)
{
string data = " somedata";
string requestUri = serverUri + "ActivityCollection(guid'" + objectUID + "')";
Encoding encoding = Encoding.Default;
var request = WebRequest.Create(requestUri) as HttpWebRequest;
request.Method = "PATCH";
request.ContentType = "application/json; charset=utf-8";
request.Credentials = new NetworkCredential(username, password);
byte[] buffer = encoding.GetBytes(data);
Stream dataStream = request.GetRequestStream();
dataStream.Write(buffer, 0, buffer.Length);
dataStream.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
string result = "";
using (StreamReader reader = new StreamReader(response.GetResponseStream(), System.Text.Encoding.Default))
{
result = reader.ReadToEnd();
}
MessageBox.Show(dataStream.ToString());
Have looked here: https://documenter.getpostman.com/view/10204500/SztHX5Qb?version=latest#78ea2d20-a8a5-4293-8aa5-0fa694d14d33
here:https://community.creatio.com/taxonomy/term/5162
and here: https://academy.creatio.com/documents/technic-sdk/7-16/integrations-and-external-api
with no luck.
Any suggestions or code snipit's are welcome!