• Chad Davis
  • NEWBIE
  • 20 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
Hey Guys,  I am getting this error in my simple Apex class: Illegal assignment from Schema.SObjectField to String at line 3 column 1

FYI - Opportunity.Description__c is a Long Rich text field.

____

Global with sharing class Job_Description_Transfer {

string htmlString = opportunity.Description__c;

String RegEx ='(</{0,1}[^>]+>)';
string result= htmlString.replaceAll(RegEx, '');



}

What am i doing wrong?

Thanks for your help!!

chad
Hey I have a trigger that transfers a (long) Rich Text field {parent} to another (long) Rich text field {child}. The problem is that  from here, I need to send this to an outside application that cant handle rich text.  Is there any way, within the trigger, that I can still send the data from one Rich field but somehow keep the formating to the next Static Long text field while importantly leaving out the <html> tags that mess up the document?  I know its a long shot.. Thanks for any help. 

Best, 
Chad Davis
Hey Salesforce brilliance, 

I am trying to deploy my trigger but I need to compose a test class and to be quite honest I am clueless and aloof at my begining stages of Apex-ing' . Could someone here please provide me with a little guidence, code perhaps and maybe addition educational documentation to make sense of this all so I can continue my journey to be half as great as many of you here. 

Happy Holidays And thank you very much

-Chad 

Trigger is here:

trigger Job_Description_Transfer on Job_Contract__c (before update, before insert) {

//create a set of job descriptions      
  
    set<Id> Ids = new Set <Id>();         
    for (Job_Contract__c japp: Trigger.new) {           
        Ids.add(japp.Related_Job__c);  // This is thelookup field to description__c in Job_Contract__c
    }
  
    Map<Id, Opportunity> mapDescription = New Map<Id, Opportunity>([SELECT Id, Description FROM Opportunity WHERE Id IN :Ids]);
  
    if(trigger.isUpdate){ 
  
        for(Job_Contract__c jaTrigger : trigger.new) {
          
            jaTrigger.Job_Description__c = mapDescription.get(jaTrigger.Related_Job__c).Description;
          
        }
        }

Hey SF Guru's,

 

A recent change to SF has made my simple Iframes HTML coded in a homepage component dissapear in every browser except IE which then asked permission for secure info. Can anyone help me figure out why and how to get them to show again. Also, All my clickjack settings are turned off.

 

Thanks for the help.

 

Best,

 

Chad

Hey Guys,  I am getting this error in my simple Apex class: Illegal assignment from Schema.SObjectField to String at line 3 column 1

FYI - Opportunity.Description__c is a Long Rich text field.

____

Global with sharing class Job_Description_Transfer {

string htmlString = opportunity.Description__c;

String RegEx ='(</{0,1}[^>]+>)';
string result= htmlString.replaceAll(RegEx, '');



}

What am i doing wrong?

Thanks for your help!!

chad
Hey Salesforce brilliance, 

I am trying to deploy my trigger but I need to compose a test class and to be quite honest I am clueless and aloof at my begining stages of Apex-ing' . Could someone here please provide me with a little guidence, code perhaps and maybe addition educational documentation to make sense of this all so I can continue my journey to be half as great as many of you here. 

Happy Holidays And thank you very much

-Chad 

Trigger is here:

trigger Job_Description_Transfer on Job_Contract__c (before update, before insert) {

//create a set of job descriptions      
  
    set<Id> Ids = new Set <Id>();         
    for (Job_Contract__c japp: Trigger.new) {           
        Ids.add(japp.Related_Job__c);  // This is thelookup field to description__c in Job_Contract__c
    }
  
    Map<Id, Opportunity> mapDescription = New Map<Id, Opportunity>([SELECT Id, Description FROM Opportunity WHERE Id IN :Ids]);
  
    if(trigger.isUpdate){ 
  
        for(Job_Contract__c jaTrigger : trigger.new) {
          
            jaTrigger.Job_Description__c = mapDescription.get(jaTrigger.Related_Job__c).Description;
          
        }
        }

Hey SF Guru's,

 

A recent change to SF has made my simple Iframes HTML coded in a homepage component dissapear in every browser except IE which then asked permission for secure info. Can anyone help me figure out why and how to get them to show again. Also, All my clickjack settings are turned off.

 

Thanks for the help.

 

Best,

 

Chad