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();})();