IvanWeiss
6 years agoQrew Captain
Restructuring Task Table Broke all my API Buttons, Not sure how to fix
I recently corrected my tasks table. It used to have a List User Field for Assigned To so that I could easily assign tasks and create API buttons to be able to create tasks from my "Opportunities" Table (other places as well).
Some users reported they needed a feature so that they could see all of the tasks their team employees were working on. So I had to restructure this table so that now I have a departments table with a List User Manager field (sometimes we have more than one manager) and be able to pass that data around to generate the report. Just got that working, phew. With a lot of help from the community.
Now, I have my first button I am trying to fix. Here is the code:
URLRoot() & "db/" & [_DBID_TASKS] & "?a=API_GenAddRecordForm&_fid_12=" & URLEncode ([Record ID#])&
"&_fid_6=" & URLEncode("Standard Design Proposal") &
"&_fid_8=" & URLEncode(Today()) &
"&_fid_12=" & [Record ID#] &
"&_fid_21=" & [Project] &
"&_fid_23=" & "Opportunity" &
"&_fid_28=" & "Opportunity" &
"&_fid_31=" & "mmattera@elitestudioe.com" &
"&z=" & Rurl()
I need to replace the fid31 line. Somehow I need to create a record in my task assignees table that relates back to this task. The problem is until this record is saved I dont know its record ID. So I am not quire sure how to add anything in the join table (Tasks has many Task Assignees, Task Assignees as many Team Members).
Some users reported they needed a feature so that they could see all of the tasks their team employees were working on. So I had to restructure this table so that now I have a departments table with a List User Manager field (sometimes we have more than one manager) and be able to pass that data around to generate the report. Just got that working, phew. With a lot of help from the community.
Now, I have my first button I am trying to fix. Here is the code:
URLRoot() & "db/" & [_DBID_TASKS] & "?a=API_GenAddRecordForm&_fid_12=" & URLEncode ([Record ID#])&
"&_fid_6=" & URLEncode("Standard Design Proposal") &
"&_fid_8=" & URLEncode(Today()) &
"&_fid_12=" & [Record ID#] &
"&_fid_21=" & [Project] &
"&_fid_23=" & "Opportunity" &
"&_fid_28=" & "Opportunity" &
"&_fid_31=" & "mmattera@elitestudioe.com" &
"&z=" & Rurl()
I need to replace the fid31 line. Somehow I need to create a record in my task assignees table that relates back to this task. The problem is until this record is saved I dont know its record ID. So I am not quire sure how to add anything in the join table (Tasks has many Task Assignees, Task Assignees as many Team Members).