Hi, I'm Cathy, a Web Designer/Developer/WordPress Fanatic/Salesforce.com APEX Coder, etc. and I'm from the Philippines. Learn more about me...

I’m back to blog with my fresh looking website!

Published by under Blogging,Self-Confessions on Sunday, January 22nd, 2012 at 12:35 am

Haven’t blogged for more than a year… My last post was February 22, 2010 to be exact. Wheeew! Well, I didn’t vanished… I just got busy with a lot of “cloud computing” tasks.  :mrgreen:

 

After years of creating nice and great looking websites for my clients, I realized that I have to revamp my old website’s layout. The HTML version has been occupying my laptop’s storage for more than six months already. Though it’s not totally polished yet, I’m too excited to share it to the world that’s why I’m now officially launching it! 

 

Thanks for dropping by, please come back soon… ciao!

 

The New Look

 

 

 

 

No responses yet

Invoking Apex from a Custom Button using a Visualforce Page

Published by under Salesforce.com on Monday, February 22nd, 2010 at 4:42 pm

This post is about creating a custom button to be placed in a detail page using Visualforce page instead of an S-control (deprecated). I will be using Opportunity object for this example.

The Controller:

public class VFController
{
    private final ApexPages.StandardController theController;
    public List<Opportunity> listOpps = new List<Opportunity>();
 
    public VFController(ApexPages.StandardController stdController)
    {
          theController = stdController;
    }
    // Code we will invoke on page load.
    public PageReference autoRun()
    {
        for (Opportunity opp:[select id, name from Opportunity where id =:theController.getId()])
            {
	        opp.Name = opp.name + ' test';
                listOpps.add(opp);
	    }
		Database.update(listOpps);
 
	return theController.view().setRedirect(true);
    }
}

The Visualforce Page:

You don’t need to do anything special here. The most important part here is the parameter action = “{!autoRun}”.

<apex:page standardController="Opportunity"
extensions="VFController"
action="{!autoRun}"
>
<apex:sectionHeader title="Invoking Apex from a Button"/>
<apex:outputPanel>
You shoudn't see this page...
</apex:outputPanel>
</apex:page>

After that, go to Setup –> App Setup –> Customize –> Opportunities –> Buttons and Links. Add a new custom button with the following configuration.

This example simply appends “test” to the Opportunity name when you click on that custom button. This is only to show you that it works. Hope this helps. :)

One response so far

It’s gonna make sense – PBB Double Up Eviction Song

Published by under Nothing in particular on Thursday, February 11th, 2010 at 2:43 am

This doesn’t really sound like MLTR! LOL!

Lyrics:

Life comes in many shapes
You think you know what you got
Until it changes
And life will take you high and low
You gotta learn how to walk
And then which way to go
Every choice you make
When you’re lost
Every step you take
Has it’s cause
Continue Reading »

No responses yet

How to Dream by Sam Phillips – PBB background music

Published by under Nothing in particular on Thursday, February 11th, 2010 at 2:29 am

The first time I heard this song I already liked it. Originally, it’s a Gilmore Girls soundtrack. Check the YouTube video. I hope you guys like this too. :)

Lyrics:

How to Dream by Sam Phillips

Ah… Ah… Ah Ahhh Ah Ahhh
When we open our eyes and
dream
We open our eyes

Ah… Ah… Ah Ahhh Ah Ahhh
When we open our eyes and dream
We open our eyes
Continue Reading »

3 responses so far

Christmas spent in Manila

Published by under Self-Confessions on Thursday, February 11th, 2010 at 1:59 am

Xai and I didn’t go home for Christmas, our family went here instead. :)

Have a look at some of our pics.

No responses yet

Next »