• Kate Porter 3
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Our company merged with another and we use their Salesforce org. I am still in the same job but have to access Trailhead with credentials for the old org. OK as long as the old org is kept live but I think it will lapse this year.

Is it possible to edit profiles? Or, merge two?
I can create a new task from a button and set all the fields I want except the record type. Can anyone help?

I tried myTask.RecordType = "Support Type"; and also RecordTypeID. I either get an error message or no task created.

This code works:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var myTask = new sforce.SObject("Task");
myTask.WhatId= "{!Case.Id}";
myTask.Subject = "{!Case.Account} - {!Case.Reason}";
myTask.status = "Not Started";
myTask.Activity_Business_Type__c = "Existing Business";
myTask.Type = "Product Support Task";
myTask.ActivityDate = "{!SUBSTITUTE(TEXT(TODAY()+3), "/", "-")}";
sforce.connection.create([myTask]);
window.location.reload();
I can create a new task from a button and set all the fields I want except the record type. Can anyone help?

I tried myTask.RecordType = "Support Type"; and also RecordTypeID. I either get an error message or no task created.

This code works:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
var myTask = new sforce.SObject("Task");
myTask.WhatId= "{!Case.Id}";
myTask.Subject = "{!Case.Account} - {!Case.Reason}";
myTask.status = "Not Started";
myTask.Activity_Business_Type__c = "Existing Business";
myTask.Type = "Product Support Task";
myTask.ActivityDate = "{!SUBSTITUTE(TEXT(TODAY()+3), "/", "-")}";
sforce.connection.create([myTask]);
window.location.reload();