• mollydog
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

Hello I am new to Apex / Trigger and would like to use it to update one field from another on a custom object. I know this can be done via workflow but would like to try this with  a trigger so I can start to understand more about Apex. I am in the mids of reading about apex etc but would be grateful if someone could give me a few examples.

 

What I am trying to achieve:

 

Object name = Test object

 

Field 1 = A

 

Field 2 = B

 

All I want to do is make "field A" update with "field B" value after update.

 

Thank you

Hello I am new to Apex / Trigger and would like to use it to update one field from another on a custom object. I know this can be done via workflow but would like to try this with  a trigger so I can start to understand more about Apex. I am in the mids of reading about apex etc but would be grateful if someone could give me a few examples.

 

What I am trying to achieve:

 

Object name = Test object

 

Field 1 = A

 

Field 2 = B

 

All I want to do is make "field A" update with "field B" value after update.

 

Thank you

Hi friends,

My requirement is to redirect my page to a visualforce page when i select a particular record type. and it should autopopulate some fields from its parent object.

Example: My visualforce page is on Contact object and after i choose a record type it should redirect to a new visualforce page with address fields on contact object auto populated from Account object.

I have tried working on this with the help of some Blog's.. But it didn't worked the way i want.

So can anyone suggest the exact way to get this requirement done (Or) any sample code would be really helpful/ appriciated.


Thanks,
​Dev.
  • December 03, 2016
  • Like
  • 0

Hello I am new to Apex / Trigger and would like to use it to update one field from another on a custom object. I know this can be done via workflow but would like to try this with  a trigger so I can start to understand more about Apex. I am in the mids of reading about apex etc but would be grateful if someone could give me a few examples.

 

What I am trying to achieve:

 

Object name = Test object

 

Field 1 = A

 

Field 2 = B

 

All I want to do is make "field A" update with "field B" value after update.

 

Thank you

After reading the documentation I did following

1. created sample CSS file named customStyles.css:

 

<style type="text/css">
body { background-image: url("images/SFSummary.gif") }
</style>

 

 2. Zipped up the images folder and customStyles.css together as myStyles.zip

 

 3.  Uploaded myStyles.zip as Static Resources with the name myStyles

 

 

 4. Referenced the stylesheet in visualforce page:

 

<apex:page standardController="Mileage__c" extensions="MileageExtension" tabStyle="Mileage_Custom_View__tab" standardStylesheets="false" >
<apex:stylesheet value="{!URLFOR($Resource.myStyles, 'customStyles.css')}"/>
.......
.......
.......

 

 It does not work. Couldn't figure out .....