• Gabriel Meneses 10
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 9
    Replies
I would like help in creating an Apex class that this trigger would call on to achieve the record type change on a Task. It would change the record type based on the Task Subject. I want the Apex class to cause the update, not the trigger.


01trigger TaskRecordType on Task  (after delete, after insert, after update, before delete, before insert, before update) {
02 
03    if(Trigger.isBefore && Trigger.isInsert) {
04     
05        Map<String, Schema.RecordTypeInfo > taskRecordTypes =Task.sObjectType.getDescribe().getRecordTypeInfosByName();
06        Id recordTypeId = taskRecordTypes.get('<b>My Task Name (NOT API)</b>').getRecordTypeId();
07         
08        for ( Task tsk : Trigger.new) {
09            <b>if(tsk.Subject.equals('Condition'))</b>
10                tsk.RecordTypeId = recordTypeId;
11        }
12    }
13}

I have created a new survey in production environment using Survey Force from the app exchange by Salesforce Labs. When the survey is sent with caseid and contactid links from a case using an Email Template built with the Survey Force link within it. The user receives the email and survey link, can access and fill in the answers to the survey, BUT, when they attempt to Submit the answers, this message appears on top of page.

Error: Some error occured while saving response

Does anyone know what is causing this, I've checked multiple threads, enabled headers, permissions are properly set, access and visibility seem to be exactly as stated in install guide. Our org is heavily customized and lots of code but I cannot find the source of the error. Thank you for your help and time.

GabeError Message
I created a custom object related to the Case Object to track case handle time, I built 2 process builders to help keep my custom object updated automaticall with ay changes in case status and case owners. The issue I am having is that the process builder only associates users but in my org we use queues as well, so now any time the case owner is changed from a user to a queue it errors out and does not save it to the new queue owner. Does anyone know how I can step by step associate the queues to my custom object so that the Flow functions properly?

Thank you in advance...
Good afternoon everyone, I am currently running in an issue with an Apex Class. In my case, the custom delete button for the opportunity object is not working on any profile outside of Sys Admin. I've checked the Apex Class Security and all is good there, as well as the API enabled for other profiles but nothing seems to allow it to work under any other profile. Does anyone have any ideas on what could be prohibiting this from functioning?

Thank you
 I want to create a custom button in my opportunity object that can do very specific tasks. It needs to delete the opportunity clone, uncheck the Opportunity rolled checkbox and change the stage from closed to actively selling. Any ideas on where to start with this one?
Can we fetch all those users who have access to lightning experience? Or if we can get all those profiles for which Lightning Experience User permission has been enabled.
  • March 19, 2018
  • Like
  • 0

I have created a new survey in production environment using Survey Force from the app exchange by Salesforce Labs. When the survey is sent with caseid and contactid links from a case using an Email Template built with the Survey Force link within it. The user receives the email and survey link, can access and fill in the answers to the survey, BUT, when they attempt to Submit the answers, this message appears on top of page.

Error: Some error occured while saving response

Does anyone know what is causing this, I've checked multiple threads, enabled headers, permissions are properly set, access and visibility seem to be exactly as stated in install guide. Our org is heavily customized and lots of code but I cannot find the source of the error. Thank you for your help and time.

GabeError Message
Good afternoon everyone, I am currently running in an issue with an Apex Class. In my case, the custom delete button for the opportunity object is not working on any profile outside of Sys Admin. I've checked the Apex Class Security and all is good there, as well as the API enabled for other profiles but nothing seems to allow it to work under any other profile. Does anyone have any ideas on what could be prohibiting this from functioning?

Thank you
 I want to create a custom button in my opportunity object that can do very specific tasks. It needs to delete the opportunity clone, uncheck the Opportunity rolled checkbox and change the stage from closed to actively selling. Any ideas on where to start with this one?
I have created a WFR that creates a task every time the Account has a certain product listed in a custom field.  The task is created just fine, but I need the task to be a certain task record type, rather than the default type.

I have created another rule to update the task record type field when the subject correlates to the first task created.  I realize that a workflow cannot be triggered off of another workflow.

I need to write the trigger to change the task record type, can someone please help with this??

Thanks!!
Hi Gurus,

One new requirement, We need to attach products to opportunities based on opportunity record types. Is this possible through Apex triggers?

Please help

Thanks,
Yamini
  • July 25, 2014
  • Like
  • 0