Skip to content

Instantly share code, notes, and snippets.

View amrud's full-sized avatar
🏠
Working from home

Ismi Ammar amrud

🏠
Working from home
View GitHub Profile
@amrud
amrud / CheckAttachmentSize.page
Created March 29, 2016 04:56 — forked from keirbowden/CheckAttachmentSize.page
Visualforce page that checks the size of a file selected for upload
<apex:page standardController="Account" extensions="AddAttachmentExt">
<apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js"/>
<apex:form>
<apex:sectionHeader title="{!Account.name} Attachments" />
<apex:pageBlock mode="maindetail">
<apex:pageBlockSection title="Existing Attachments" columns="1">
<apex:PageBlockTable value="{!Account.Attachments}" var="attach">
<apex:column value="{!attach.Name}" />
<apex:column headerValue="Length (bytes)" value="{!attach.BodyLength}" />
<apex:column headerValue="Owner" value="{!attach.Owner.Name}" />
@amrud
amrud / AddAttachmentExt.cls
Created March 29, 2016 04:56 — forked from keirbowden/AddAttachmentExt.cls
Extension controller to save an attachment associated with a record encapsulated in the standard controller
public with sharing class AddAttachmentExt
{
private ApexPages.StandardController stdCtrl;
public Attachment att {get; set;}
public AddAttachmentExt(ApexPages.StandardController inStd)
{
stdCtrl=inStd;
att=new Attachment();
}
@amrud
amrud / designer.html
Created August 19, 2014 00:42
designer
<link rel="import" href="../paper-ripple/paper-ripple.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@amrud
amrud / designer.html
Created August 18, 2014 03:15
designer
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../google-map/google-map-directions.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../smoothie-chart/smoothie-chart.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-leaderboard.html">
<polymer-element name="my-element">