Scripts

The following is a list of scripts your can add to your RightTool PRO, to perform functions that are not hard coded into RightTool yet. Tutorial: https://youtu.be/UPqXs-U90L8

Open Grid Gear on Detail Reports and remove all checkboxes for columns/fields except one

javascript:(function(){const settingsButton=document.querySelector('.gearIcon.hi-settings-o');if(settingsButton){settingsButton.click();setTimeout(()=>{const showMoreButton=document.querySelector('a[data-dojo-attach-point="_showMoreLink"]');if(showMoreButton&&showMoreButton.style.display!=='none'){showMoreButton.click();setTimeout(()=>{const checkboxes=document.querySelectorAll('.dijitPopup .checkBox');if(checkboxes.length>1){for(let i=1;i<checkboxes.length;i++){if(checkboxes[i].checked){checkboxes[i].click();}}}else{console.log('Not enough checkboxes found.');}},500);}else{console.error('Show More button not found or already displayed.');}},1000);}else{console.error('Settings button not found.');}})();

Rename the current browser tab

javascript:(function()%7Bvar%20newTitle%20%3D%20prompt(%22Enter%20a%20new%20name%20for%20this%20tab%3A%22%2C%20%22%22)%3Bif(newTitle)%7Bdocument.title%20%3D%20newTitle%3B%7D%7D)()

Make Current Selected Accounts Active (that are shown and checked in the current Chart of Accounts Page)

javascript:(async function(){const a=[];document.querySelectorAll('tbody > tr').forEach(e=>{const c=e.querySelector('input[type="checkbox"]');if(c&&c.checked){const n=e.cells[1].textContent.trim();a.push(n);}});for(const n of a){const r=document.querySelectorAll('tbody > tr');for(const e of r){if(e.cells[1].textContent.trim()===n){const b=e.querySelector('button');if(b&&b.textContent.trim()==='Make active'){b.click();await new Promise(resolve=>setTimeout(resolve,1000));break;}}}}})();

Copy Current Estimate into a Project/Cost Estimate

javascript:(function(){ var currentUrl = window.location.href; var regex = /^https:\/\/app.qbo.intuit.com\/app\/estimate\?txnId=(\d+)$/;%20%20%20%20%20var%20match%20=%20currentUrl.match(regex);%20%20%20%20%20if%20(match)%20{%20%20%20%20%20%20%20%20%20var%20txnId%20=%20match[1];%20%20%20%20%20%20%20%20%20var%20newUrl%20=%20%27https://app.qbo.intuit.com/app/estimate?srcTxnId=%27%20+%20txnId%20+%20%27&srcTxnTypeId=35&projectCostEstimate=true%27;%20%20%20%20%20%20%20%20%20window.open(newUrl,%20%27_blank%27);%20%20%20%20%20}%20else%20{%20%20%20%20%20%20%20%20%20alert(%27This%20bookmarklet%20only%20works%20on%20estimate%20pages%20with%20a%20txnId.%27);%20%20%20%20%20}%20})();

Copy Current Estimate to a PO (Plus/Adv Only)

javascript:(function(){
    var currentUrl = window.location.href;
    var regex = /^https:\/\/app\.qbo\.intuit\.com\/app\/estimate\?txnId=(\d+)$/;
    var match = currentUrl.match(regex);
    if (match) {
        var txnId = match[1];
        var newUrl = 'https://app.qbo.intuit.com/app/purchaseorder?srcTxnId=' + txnId + '&srcTxnTypeId=35&nameId=99999';
        window.open(newUrl, '_blank');
    } else {
        alert('This bookmarklet only works on estimate pages with a txnId.');
    }
})();

Perform a Search by Ref. Number in a new tab

javascript:(function(){try{var selected_text=window.getSelection().toString();console.log("Selected text: ",selected_text);var invoice_number=prompt("Please enter the invoice number:",selected_text);console.log("Entered invoice number: ",invoice_number);var search_url=`https://app.qbo.intuit.com/app/search?searchCat=transaction&searchTransactionType=x999&searchValue=&searchAdvFieldArray=refno&searchAdvFieldLabelArray=Reference%20no.&searchAdvValueArray=${invoice_number}&searchAdvValueLabelArray=${invoice_number}&searchAdvOpArray=~`;console.log("Constructed URL: ",search_url);window.open(search_url,'_blank');console.log("URL opened in a new tab");}catch(e){console.error("Error: ",e);alert("An error occurred. Please check the console for details.");}})();

Copy all the Bill Numbers attached to a Bill Payment (Check or CC) into the Bill Payment Memo

javascript:(function(){const rows=document.querySelectorAll('table tbody tr');let billsPaid=[];rows.forEach(row=>{const checkbox=row.querySelector('input[type="checkbox"]');if(checkbox&&checkbox.checked){const descriptionElement=row.querySelector('td[data-testid^="outstanding_table_description"] button');const billNumber=descriptionElement?descriptionElement.textContent.replace(%27Bill%20#%20','').trim():'';const%20paymentElement=row.querySelector('input[type=%22text%22][data-testid^=%22outstanding_table_payment%22]');const%20paymentAmount=paymentElement?paymentElement.value.trim():'';if(billNumber&&paymentAmount){billsPaid.push(%60${billNumber}%20=%20${paymentAmount}%60);}}});const%20resultString=%60Bills%20Paid:%20${billsPaid.join('%20/%20')}%60;const%20memoBox=document.querySelector('textarea[data-testid=%22private_memo_textarea%22]');const%20currentMemo=memoBox.value;const%20newMemoContent=%60${currentMemo}%20/%20${resultString}%60;memoBox.value=newMemoContent;console.log(newMemoContent);navigator.clipboard.writeText(newMemoContent).then(()=%3E{console.log('New%20memo%20content%20copied%20to%20clipboard');});})();

Save current Sales Receipt (from a Recurring Template) & open a new from the template

javascript:(function(){function clickSaveButton(){var saveButton=document.querySelector('button[data-cy="save"]');if(saveButton){saveButton.click();console.log("Save Button clicked");}else{console.log("Save Button not found");}}function checkAndClickOneTimeOnlyButton(){var oneTimeOnlyButton=document.querySelector('button[data-testid="update_template_modal_no_btn"]');if(oneTimeOnlyButton){oneTimeOnlyButton.click();console.log("One Time Only Button clicked");}else{console.log("One Time Only Button not found");}}function refreshPage(){setTimeout(function(){window.location.reload();console.log("Page reloaded");},2000);}clickSaveButton();setTimeout(function(){checkAndClickOneTimeOnlyButton();refreshPage();},1000);})();

Make all displayed Products & Services active, by automating the pressing of the “Make Active” button in batch (2 second delay) – Only works in the OLD screen

javascript:(async function(){async function waitForElement(selector){return new Promise((resolve,reject)=>{const interval=setInterval(()=>{const element=document.querySelector(selector);if(element){clearInterval(interval);resolve(element);}},500);setTimeout(()=>{clearInterval(interval);reject(new Error('Timeout waiting for element: '+selector));},10000);});}async function clickButton(button){button.click();await waitForPageLoad();}async function waitForPageLoad(){return new Promise(resolve=>{const interval=setInterval(()=>{if(document.readyState==='complete'){clearInterval(interval);setTimeout(resolve,1000);}},500);});}async function main(){let buttons;let clickedButtons=new Set();while(true){buttons=Array.from(document.querySelectorAll('button.combo-button-main')).filter(button=>button.innerText==='Make active');let unclickedButtons=buttons.filter(button=>!clickedButtons.has(button));if(unclickedButtons.length===0){break;}let buttonToClick=unclickedButtons[0];clickedButtons.add(buttonToClick);await clickButton(buttonToClick);}console.log('All buttons have been clicked.');}await main();})();


Open the Unpaid Bills Report filtered by the current vendor from the Vendor Detail screen your are in

javascript:(function(){try{let url=window.location.href,vendorIdMatch=url.match(/nameId=(\d+)/);if(vendorIdMatch){let vendorId=vendorIdMatch[1],reportUrl=`https://qbo.intuit.com/app/reportv2?token=UNPAID_BILLS&show_logo=false&saved_rpt_token=UNPAID_BILLS&date_macro=all&report_date=&customized=yes&columns=~date%3ATxDate%2C~txn_type_label%3ATxTypeID%2C~doc_num%3ATxHeader%2FDocNum%2C~location_dept%3ADeptID%2C~due_date%3ADueDate%2C!~past_due_label%3ADueDate%2C-~amount_label%3A-.Amount%2C-~open_balance%3A-.OpenBalance%2C&collapsed_rows=&edited_sections=false&divideby1000=false&hidecents=false&negativenums=1&negativered=false&show_header_title=true&show_header_range=true&show_footer_custom_message=true&show_footer_date=true&show_footer_time=true&header_alignment=Center&footer_alignment=Center&show_header_company=true&title=Unpaid%20Bills&footer_custom_message=&vendor=${vendorId}&aging_as_of=false&past_due=`;window.open(reportUrl,'_blank')}else{alert('Vendor ID not found in the current URL.')}}catch(e){alert('Error occurred: '+e.message)}})();

In the Reconcile Screen, double the width of any column with this script

javascript:(function(){let e=[];function t(){const t=Array.from(document.querySelectorAll("th"));0===e.length&&(e=t.map(e=>e.offsetWidth));const n=t.map(e=>e.textContent.trim()).filter(e=>""!==e);n.push("RESET ALL");const l=prompt(`Select a column to resize or reset (enter a number):\n${n.map((e,t)=>`${t+1}. ${e}`).join("\n")}`),o=parseInt(l)-1;if(isNaN(o)||o<0||o>=n.length)return void console.log("Invalid selection. Please try again.");if(o===n.length-1)t.forEach((e,t)=>{e.style.width="",e.style.minWidth="";const n=document.querySelectorAll(`td:nth-child(${t+1})`);n.forEach(e=>{e.style.width="",e.style.minWidth=""})}),console.log("All columns reset to original size");else{const e=t[o],l=e.offsetWidth,i=2*l;e.style.width=`${i}px`,e.style.minWidth=`${i}px`;const d=document.querySelectorAll(`td:nth-child(${o+1})`);d.forEach(e=>{e.style.width=`${i}px`,e.style.minWidth=`${i}px`}),console.log(`Width of "${n[o]}" column doubled from ${l}px to ${i}px`)}}t()})();