• Robbert Bos1
  • NEWBIE
  • 0 Points
  • Member since 2016
  • ICE Interim

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello all,

first, I have to see this is my first crack at APEX. I use an external database to fill some custom objects with data we need for the proces but not all data is needed. What I'm trying is to find a parent record based on the external id value. If the parent record is found: Fill the lookup relationship. So far, so good.

But when there is no parent found I want to delete the record or not have it saved. This is where the errors start. Somehow I cannot delete a record which entererd my trigger.

Does anybody have an idea?
 
trigger KoppelPersoonsfase on Persoonsfase__c (before insert, before update) {
    
    for (Persoonsfase__c p : Trigger.new) {
        if(p.PersoonID__c != null){
            string FlexId = p.PersoonID__c;
            List<Parent__c> Kandidaat = [SELECT Id FROM Parent__c WHERE FlexService_ID__c = :FlexId];

            p.Werknemer__c = Kandidaat[0].Id;
        } else {
            delete p;	
        }
    } 
}

 

Trying to modify the text formatting in the Screens by overriding a default setting of the CSS class. As an experiment, just trying to set text color to red. Found the class name using Chrome's Developer Tools. (Also modified the buttons, successfully based on an example given on the message board here.)

 

Text doesn't change to red - what am I missing?

 

Thanks!

Ed

 

<apex:page >

<style type="text/css">
.bPageBlock .pbBottomButtons .pbButtonb .btn { 
  color: #808080;
  display: inline;
  float: left;
  font: bold 16px arial, sans-serif;
  height: 24px;
}
</style>

<p style="color: #808080; font-size: 175%; font-weight: bolder; margin-top: 0.3em; margin-bottom: 0.2em">
  DH Interface Designer
</p>

<style type="text/css">
.theflow {
  color: #ff0000;
}
</style>
 
<div id="theflow">
  <flow:interview name="GP3_FLOW_9_1_12" buttonLocation="bottom" />
</div>
 
</apex:page><apex:page >

<style type="text/css">
.bPageBlock .pbBottomButtons .pbButtonb .btn { 
  color: #808080;
  display: inline;
  float: left;
  font: bold 16px arial, sans-serif;
  height: 24px;
}
</style>

<p style="color: #808080; font-size: 175%; font-weight: bolder; margin-top: 0.3em; margin-bottom: 0.2em">
  DH Interface Designer
</p>

<style type="text/css">
.theflow {
  color: #ff0000;
}
</style>
 
<div id="theflow">
  <flow:interview name="GP3_FLOW_9_1_12" buttonLocation="bottom" />
</div>
 
</apex:page>