Add Note to Task
Posted: Wed Oct 16, 2019 12:03 pm
Hello,
I'm trying to add a note to a task whenever the task is added to an order. The code below adds a note to the order when a task is created. How can I modify it to add the note to the task? Thanks!
I'm trying to add a note to a task whenever the task is added to an order. The code below adds a note to the order when a task is created. How can I modify it to add the note to the task? Thanks!
Code: Select all
def AddNote():
tasks = Context.Tasks
for t in tasks:
if t.Description == "Prepare Owner's Policy":
note = IOrder.CreateNew(Context, 'Note')
note.Text = 'this is just a test''
note.Categories = '3'
note.Type = NoteType.Information
note.DisplayOnOrderOpen = False
Context.Notes.Add(note)
AddNote()