• Kimberly Wargo 1
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 7
    Replies
Good Morning,
I am not knowledgable on Triggers. I have a test trigger that is failing in my org that seems to be locking up records on my bulk import. Can anyone clue me in on where to start looking to see why now it is failing?
Thanks
Kim
User-added image
I have an Apex Trigger in my org (written well before me) that is not making sense. It is now causing some of my newer processes to fail.
I disabled it in the sandbox but have not yet pushed the change set over for fear of breaking something unkonw to me.
Here is my trigger:
trigger changeAssignTo on Task (before insert) {
     for (Task t : Trigger.new) {
        if (t.Subject.contains('{!') && t.Subject.contains('}')) {
           String lookup = t.Subject.substring(t.Subject.indexOf('{!') + 2, t.Subject.indexOf('}'));
           String[] lookupSplit = lookup.split('\\.');
           SObject s = Database.query('select ' + lookupSplit[1] + ' from ' + lookupSplit[0] + ' where Id = \'' + t.WhatId + '\'');
           t.OwnerId = (Id)s.get(lookupSplit[1]);
           t.Subject = t.Subject.substring(0, t.Subject.indexOf('{!')) + t.Subject.substring(t.Subject.indexOf('}') + 1); 
        }
     }    
}
If I deploy the change set and something fails, can I undo it?
And does this trigger make sense to anyone for any reason??
I don't want tasks reassinged when created.
Thanks..
 
Good Morning. I have a job scheduled in my sandbox (because I am new to building them) and it is scheduled and in que but has not fired.
It has past the scheduled time yet still shows in que. 
It is for a mass delete of records in a custom object based on a prior date.
Any suggetions to trouble shoot why?
Thanks
 
Hey all, building a custom button in a custom object and want to prepopulate info from another linked custom object.
As follows:
I have a custom button on a custom object called "Document Review". I created the button on the custom object called "Financial Account". The button is called "Modification Doc Review".
It should be generated from the "Financial Account" when a modification is made to that account. I have the button built with the correct record type pulling up but I need to prepopulate fields in this record from the originating object ("Financial Account").
How do I map the fields?
Example:
{!Document_Review_Process__c.Client_Name__c} = {!EAST_FinancialAccount__c.AccountName__c}
So the doc review "Client Name" should prepopulate with the "Account Name" from the orginating object "Financial Account".

Any help is always appreciated.
Good Morning,
A prior Admin in my org set up a job to delete records when a new import occurs in a custom object on a daily basis.
To explain, we use a custom object in our org called "Additional Related Contacts". It imports from our core banking system and attaches to our contacts object. It is supposed to delete the old and replace with the new. It appears to be not functioning and I have no idea where to even look for this job.
I've looked in scheduled Jobs, Apex Jobs, Background Jobs, Bulk data Load etc and nothing appears to be what I am looking for.
How would I go about uncovering this needle in the haystack.
Any ideas or suggestions are appreciated.

 
Hi there... I am trying to write a trigger in tasks/events. I'm not versed on writing triggers. Here is my goal.
The Task/Event only recognizes the 15 string ID of the contact name (per my SF Support) and I am trying to write a formula to capture the string and change to Name in a custom field.

Here is what I am trying to explain. We use taks/events very heavily in our company. I wrote a formula to update the "Subject" field with the "Client Name" + "Type". It works fine but can only use the WhoId so the update shows the 15 digit string plus the task type.
I want to write a trigger to change the client name from the id to a text name when the record saves in a custom field created in the task/event pages..
Example of formula
User-added image

Thanks
Kim
I hope this is an easy one.. I have not yet started writing triggers so it's all foreign to me.
I need to write a trigger to reassign a task based on a subject content to a lookup user in the record.
We have mutliple people that handle an account and I created a workflow/rule to automatically assign a task based on a specific criteria but I cannot assign it to another user besides the account owner.
Any help is appreciated.
Good Morning,
I am not knowledgable on Triggers. I have a test trigger that is failing in my org that seems to be locking up records on my bulk import. Can anyone clue me in on where to start looking to see why now it is failing?
Thanks
Kim
User-added image
I have an Apex Trigger in my org (written well before me) that is not making sense. It is now causing some of my newer processes to fail.
I disabled it in the sandbox but have not yet pushed the change set over for fear of breaking something unkonw to me.
Here is my trigger:
trigger changeAssignTo on Task (before insert) {
     for (Task t : Trigger.new) {
        if (t.Subject.contains('{!') && t.Subject.contains('}')) {
           String lookup = t.Subject.substring(t.Subject.indexOf('{!') + 2, t.Subject.indexOf('}'));
           String[] lookupSplit = lookup.split('\\.');
           SObject s = Database.query('select ' + lookupSplit[1] + ' from ' + lookupSplit[0] + ' where Id = \'' + t.WhatId + '\'');
           t.OwnerId = (Id)s.get(lookupSplit[1]);
           t.Subject = t.Subject.substring(0, t.Subject.indexOf('{!')) + t.Subject.substring(t.Subject.indexOf('}') + 1); 
        }
     }    
}
If I deploy the change set and something fails, can I undo it?
And does this trigger make sense to anyone for any reason??
I don't want tasks reassinged when created.
Thanks..
 
Good Morning,
A prior Admin in my org set up a job to delete records when a new import occurs in a custom object on a daily basis.
To explain, we use a custom object in our org called "Additional Related Contacts". It imports from our core banking system and attaches to our contacts object. It is supposed to delete the old and replace with the new. It appears to be not functioning and I have no idea where to even look for this job.
I've looked in scheduled Jobs, Apex Jobs, Background Jobs, Bulk data Load etc and nothing appears to be what I am looking for.
How would I go about uncovering this needle in the haystack.
Any ideas or suggestions are appreciated.