public static void UpdateActivityLogNote()
{
var binding = new BasicHttpBinding();
binding.MaxReceivedMessageSize = Int32.MaxValue;
var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx"));
var req = new UpdateNoteRequest();
req.Credentials = new bfsapi.Credentials
{
UserName = GetApiUserName(),
Password = GetApiPassword()
};
req.identify = GetApiIdentifier();
req.Fields=new UpdateNoteFields
{
Heading = true,
CustomFields = true,
EventDate = true
};
req.Entities = new[]
{
new bfsapi.UpdateNote()
{
BrickId = new Guid("20b36672-0109-4679-ad7e-aed65494977d"),
Heading = "UpdatedeHeading",
CustomFields = new CustomField[]
{
new CustomField
{
FieldName = "TestFieldUpdate",
Value = "TestValueUpdate"
},
},
EventDate = DateTime.Today.AddDays(10)
}
};
var resp = target.UpdateNotes(req);
} |