• Robin Gray
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 2
    Replies
 I converted and deployed my JavaScript buttons to Lightning prior to previewing them and copying the code is there a way to delete the JavaScript buttons that were deployed and convert them again?

I also deleted the Clone as LEAD that was deployed in Lightning is there a way to get it back?
I have created a custom button and am getting the error "expected expression, got ')'
Here is the code I'm using. I have highlighted the section where I believe the error is occurring.

{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}
 
var agree = confirm("Ok to Submit this Project Number Request to Finance?");
 
    if (agree) {
        // Ok case
        //alert('OK pressed');
        var myquery = "SELECT Id,  Start_Date__c  FROM Engagements__c WHERE Id =           '{!Engagements__c.Id}' limit 1";
        result = sforce.connection.query(myquery);
        records = result.getArray("records");
        var myEng = records[0];
        var updateEng = new Array();
        if({!Engagements__c.IB_M_A_Engagement__c}){
           myEng.RecordTypeId = '012g00000001NfX';
        } else  {
           myEng.RecordTypeId = '012j00000019Sga';
        }
 
        myEng.Prj_Request_Sent_to_Finance__c = true;
        myEng.Project_Code_Status__c = 'Project Code Requested, Check Your Email';
        updateEng.push(myEng);
        result = sforce.connection.update(updateEng);
        if(result[0].getBoolean("success")){
           alert('Project Code Request has been sent to Finance... Check your Email in the next 24 hours');
           window.location = "/" + "{!Engagements__c.Id}";
        }
 
I have a custom object called Program Events and a custom field called Max Class Size (50).  I would like to be able to count down the number of seats available when a person registers for the Program Event. I'm not sure how to make that happen
I need Javascript code to create a custom button for a custom object called Cvent Registrants. I have two custom objects, called Cvent Registrants and PDC&P Attendees, that when I have all the information for the Cvent Registran,t I would like to click a button that will add the Cvent Registrant as a PDC&P Attendee record.

Any help would be most appreciated!

Thanks,
Robin
We have admins that set up task for sales reps, however, once they are assigned to the reps the admins can't edit them.  Is there a way to allow someone below you in the heirarchy to edit task of others?
I have a custom object called Program Events and a custom field called Max Class Size (50).  I would like to be able to count down the number of seats available when a person registers for the Program Event. I'm not sure how to make that happen