getting improper statement error when using invokeUrl
greetings
i created a custom connection with zoho expense and i wanted to start manipulating records in expense using the connection and the invokeUrl method..
my function looks like this:
- void createExpense()
- {
- data = Map();
- data.put("date","2022-12-01");
- data.put("account_id","3599281000000000445");
- data.put("amount",1000);
- data.put("paid_through_account_id","3599281000000000361");
- data.put("description","Salary payment for employee Test Employee");
- response = invokeUrl
- [
- url : https://expense.zoho.com/api/v1/expenses
- type : POST
- parameters : data
- headers: "Content-type:application/json"
- connection : "test_expense_connection"
- ]
- }
but when i try to save my function before running it i keep getting the improper statement error on line 9 where i'm using the invokeUrl. what am i doing wrong? what's causing this?
Thanks