Skip to content

Instantly share code, notes, and snippets.

View apocsve's full-sized avatar
🍉
Restart

Rafael Sanchez apocsve

🍉
Restart
View GitHub Profile
@Rarst
Rarst / r-debug.php
Last active February 3, 2024 17:30
R Debug (set of dump helpers for debug)
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/
@sbob-sfdc
sbob-sfdc / InvoiceUtilities.cls
Created September 2, 2012 23:40
Workshop 201, Tutorial 4, Step 3, Apex
global with sharing class InvoiceUtilities {
// class method to renumber Line Items for a given Invoice number
// returns a string that indicates success or failure
webservice static String renumberLineItems(String invoiceName) {
// create a copy of the target Invoice object and it's Line Items
Invoice__c invoice = [Select i.Name, (Select Name From Line_Items__r ORDER BY Name)
From Invoice__c i
Where i.Name = :invoiceName LIMIT 1];