JimHarrison
5 years agoQrew Champion
Re: Rich Text - Formula Fields are pretty nice.
Hi Mike,
I did not write it so I don't think that would be fair use. I will tell you the general idea.
The button sends an API to the code page with parameters. Parameters is worth looking into...check mdn.
The javascript window.location() parses the parameters out of the originating URL into variables declared in the code page.
Then an API Query is sent to the template table that searches for records based upon one of the parameters (related template). API_DoQuery
The XML response is turned into a csv using a for loop in the code page.
The related parent parameter is placed into the clist.
Once the csv loop is all done it sends another API_ImportFromCSV to the desired child table.
We have just added child records from a template table to a related parent.
Additional tools are F12 to access the browser console.
console.log() to step through the code and determine why its not working.
Hope that helps.
Jim
------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------
I did not write it so I don't think that would be fair use. I will tell you the general idea.
The button sends an API to the code page with parameters. Parameters is worth looking into...check mdn.
The javascript window.location() parses the parameters out of the originating URL into variables declared in the code page.
Then an API Query is sent to the template table that searches for records based upon one of the parameters (related template). API_DoQuery
The XML response is turned into a csv using a for loop in the code page.
The related parent parameter is placed into the clist.
Once the csv loop is all done it sends another API_ImportFromCSV to the desired child table.
We have just added child records from a template table to a related parent.
Additional tools are F12 to access the browser console.
console.log() to step through the code and determine why its not working.
Hope that helps.
Jim
------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------