You want suggestions about how to go about building the script for this task.
I am concerned that a scripting skill level of 1% is too low to be able to build the scripts for this task - it's like walking around the block and then deciding that on the weekend you will climb Everest. The task is very involved and you have not yet been exposed to the skills and techniques to complete it. I strongly urge you to try some of the simple tutorials to understand commands and syntax, and then to expand on that to develop your script.
May I outline the steps that you need to incorporate into your script. Of course, these are just my opinion; others might have a different view.
Get the row on M-Front
- you will select a single cell or a row on "M-Front".
- the script needs to identify the cursor's row number
- there are some potential debugging issues
- make sure that the current sheet IS "M-Front"
- make sure that the cursor range is not greater than one row.
- make sure that the cursor hasn't selected the header row
Get the quote from the M-Front row
- you know the row number that the cursor is on
- now you need to get the values for that row and, specifically, the Quotation number from Column B
- you also need to get the ID of the last entry in Column Column
Increment the revision and append to M-Front
- get all the values from the selected row
- work out the current revision number (the last value in the revision number)
- add one (1) to establish the new revision number.
- append the existing values to the last row of the sheet and
- update the ID in the "new" row by one.
- on the original line, increment the revision number by one.
Update M-Items
- find any rows that have the existing revision number and update cells on that items for the new revision number.
- either use a
for
loop, or use indexOf
to find all the occurrences of an element
Update M-Payments
- rinse and repeat per M-Items
How to trigger the script
- you need a way to trigger this script; a custom menu would be a good alternative.