public static void CreateActivityLogNote()
{
var binding = new BasicHttpBinding();
binding.MaxReceivedMessageSize = Int32.MaxValue;
var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx"));
var req = new CreateNotesRequest();
req.Credentials = new bfsapi.Credentials
{
UserName = GetApiUserName(),
Password = GetApiPassword()
};
req.identify = GetApiIdentifier();
req.Entities = new[]
{
new bfsapi.CreateNote()
{
Heading = "TestHeading",
IsHTML = true,
Text = "Texting",
User = Guid.NewGuid(),
EventDate = DateTime.Today,
CustomFields = new CustomField[]
{
new CustomField
{
FieldName = "TestField",
Value = "TestValue"
},
},
}
};
var resp = target.CreateNotes(req);
} |