Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sbAYVdQu
Engaged Sweeper III
I've tried URL encoding the note, but it doesn't respect newlines. Is there a trick to this?
2 REPLIES 2
Kal451
Engaged Sweeper
sbAYVdQu wrote:
I've tried URL encoding the note, but it doesn't respect newlines. Is there a trick to this?


So I'm having the same headache. what ive come up with so far is that URL encoding as %0A should make a new line and in the query text it does:

Query text

but doesn't reflect that in the ticket.

Helpdesk Result

So I donno if the helpdesk just doesn't read it as a new line and just a space or what....
Kal451
Engaged Sweeper
Kal451 wrote:
sbAYVdQu wrote:
I've tried URL encoding the note, but it doesn't respect newlines. Is there a trick to this?


So I'm having the same headache. what ive come up with so far is that URL encoding as %0A should make a new line and in the query text it does:

Query text

but doesn't reflect that in the ticket.

Helpdesk Result

So I donno if the helpdesk just doesn't read it as a new line and just a space or what....


so, bit odd to me whos new to using any kinda api to do anything. I was sending the contents of an email as a variable and it was formatting ok.... so with a degree of "fuck it this is never going to work" just used <br> to break it up and low and behold it bloody works

Before:
Invoke-RestMethod -uri "$($HD_URI)?Action=AddNote&Key=$($HD_APIKEY)&TicketID=$($Helpdesk_Ticket)&Text=Sent%20to%20$($to)%20-%20$($body)&Username=domain\Helpdesk&Type=Internal"



After:
Invoke-RestMethod -uri "$($HD_URI)?Action=AddNote&Key=$($HD_APIKEY)&TicketID=$($Helpdesk_Ticket)&Text=Sent%20to%20$($to)%20-%20$<br>($body)&Username=domain\Helpdesk&Type=Internal"

Hopefully all of this helps someone else out later down the line





General Discussions

Find answers to technical questions about Lansweeper.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now