• Vairav
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 8
    Replies

I have a custom button added to case detail layout. i have also created Last_RequestUpdate__c(is a date/time field)  on case object.

My question: when the user clicks on the custom button, date/time field should capture the last time the Custom button was clicked.

My try: i have a javascript writtin on custom button/link .

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/22.0/apex.js")}

var caseId = '{!Case.Id}';
var resultSet = sforce.connection.query("SELECT Last_RequestUpdate__c FROM Case WHERE Id = '" + caseId + "'");
var caseObj = resultSet.records;
caseObj.Last_RequestUpdate__c = "{!NOW()}";

alert(caseObj.Last_Update_Requested__c);
var result = sforce.connection.update([caseObj]);

 

 My Problem is: alert(caseObj.Last_Update_Requested__c); shows me datetime "10/18/2013 4:09 AM"

           then i am getting this error: {faultcode:'soapenv:Client', faultstring:''10/18/2013 4:09 AM' is not a valid value for the type xsd:dateTime', }

Could you please help me how to store the value in  Last_RequestUpdate__c field?

 

 

  • October 18, 2013
  • Like
  • 0

Hi,

Need help for my requirement.

My req is: I need to have "Reason for Rejection" picklist editable when the approver clicks on approve/reject link which is available in the Approval History related list. i should make the picklist editable,so that the approver can select the reason for rejection when he/she rejects.

 

  i have been told to customize Approve/Reject page. But, how can i tag my Custom VF page.  can we override Approve/Reject link . please advise

 

 I read somewhere, i  need to customize the whow approval process since Approve/Reject link can not be overridden.

 

Please need someone's help.

I created a new email Template (HTML type). and have given The Account Message can be found on the Account here <a href = domain/' +{!CusomObject.Account__c}+ ' > {!Custom Object.Account__r.Name} </a>.

 Still i am not able to see the link under account name. It displays me the whole <a> </a> tag.

 

i tried the same <a> </a> even with email template of Text Type. but, i fail to see the link.

 

Please help

Requirment is : I need to send an email alert which should have a link to the Account.

I have created a email alert (email Template Type is Text) on a custom Object whose parent is Account. When the user clicks on the link in his mail, should take him to the account.

  My Code in email Template is:

             'The Account Message can be found on the Account here <a href = https://domain.com/' +CustomObject.Account__c + ' > CustomObject.Account__c </a>.

I trid this also

   'The Account Message can be found on the Account here <a href = https://domain.com/' +CustomObject.Account__r.Name + ' > CustomObject.Account__r.Name </a>.

  

 

My Problems is:  Account Name(CustomObject.Account__r.Name) is not displayed with the hyperLink.

 

can anyone help. Thanks in advance

 

Hi,

Upon the deletion of  my custom object(whose parent is Account), My trigger should send out an email alert.

What i have done is: 

  1. i have a mail template(AlertTemplate) created

               Account Name:{!Account_Message__c.Account__r.Name}
               Account Message: {!Account_Message__c.Name}
              Created By: {!Account_Message__c.CreatedBy}
              Last Modified By: {!Account_Message__c.LastModifiedBy}
 

  2. written a trigger

  EmailTemplate templateObj = [SELECT id, Name FROM EmailTemplate WHERE Name='AlertTemplate'];
         Messaging.MassEmailMessage massMessage = new Messaging.MassEmailMessage();
         massMessage.setTargetObjectIds(targetObjIds);
         massMessage.setTemplateId(templateObj.Id);
         massMessage.setSaveAsActivity(false);
         massMessage.setSenderDisplayName('My Portal');
         massMessage.setUseSignature(false);
         massMessage.setReplyTo('no-reply@saleforce.com');
         Messaging.sendEmail(new Messaging.MassEmailMessage [] { massMessage });

    

The Problem is: i am getting email alert, but   Object values (for Account Name, Account Message, createdBy, Last ModifiedDate)   are not displayed in the body of the mail.

 

 Can any one please let me know

Hi,

Upon the deletion of  my custom object(whose parent is Account), My trigger should send out an email alert.

What i have done is: 

  1. i have a mail template(AlertTemplate) created

               Account Name:{!Account_Message__c.Account__r.Name}
               Account Message: {!Account_Message__c.Name}
              Created By: {!Account_Message__c.CreatedBy}
              Last Modified By: {!Account_Message__c.LastModifiedBy}
 

  2. written a trigger

  EmailTemplate templateObj = [SELECT id, Name FROM EmailTemplate WHERE Name='AlertTemplate'];
         Messaging.MassEmailMessage massMessage = new Messaging.MassEmailMessage();
         massMessage.setTargetObjectIds(targetObjIds);
         massMessage.setTemplateId(templateObj.Id);
         massMessage.setSaveAsActivity(false);
         massMessage.setSenderDisplayName('My Portal');
         massMessage.setUseSignature(false);
         massMessage.setReplyTo('no-reply@saleforce.com');
         Messaging.sendEmail(new Messaging.MassEmailMessage [] { massMessage });

    

The Problem is: i am getting email alert, but   Object values (for Account Name, Account Message, createdBy, Last ModifiedDate)   are not displayed in the body of the mail.

 

 Can any one please let me know

 

 

I have a custom button added to case detail layout. i have also created Last_RequestUpdate__c(is a date/time field)  on case object.

My question: when the user clicks on the custom button, date/time field should capture the last time the Custom button was clicked.

My try: i have a javascript writtin on custom button/link .

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/22.0/apex.js")}

var caseId = '{!Case.Id}';
var resultSet = sforce.connection.query("SELECT Last_RequestUpdate__c FROM Case WHERE Id = '" + caseId + "'");
var caseObj = resultSet.records;
caseObj.Last_RequestUpdate__c = "{!NOW()}";

alert(caseObj.Last_Update_Requested__c);
var result = sforce.connection.update([caseObj]);

 

 My Problem is: alert(caseObj.Last_Update_Requested__c); shows me datetime "10/18/2013 4:09 AM"

           then i am getting this error: {faultcode:'soapenv:Client', faultstring:''10/18/2013 4:09 AM' is not a valid value for the type xsd:dateTime', }

Could you please help me how to store the value in  Last_RequestUpdate__c field?

 

 

  • October 18, 2013
  • Like
  • 0

Hi,

Need help for my requirement.

My req is: I need to have "Reason for Rejection" picklist editable when the approver clicks on approve/reject link which is available in the Approval History related list. i should make the picklist editable,so that the approver can select the reason for rejection when he/she rejects.

 

  i have been told to customize Approve/Reject page. But, how can i tag my Custom VF page.  can we override Approve/Reject link . please advise

 

 I read somewhere, i  need to customize the whow approval process since Approve/Reject link can not be overridden.

 

Please need someone's help.

Requirment is : I need to send an email alert which should have a link to the Account.

I have created a email alert (email Template Type is Text) on a custom Object whose parent is Account. When the user clicks on the link in his mail, should take him to the account.

  My Code in email Template is:

             'The Account Message can be found on the Account here <a href = https://domain.com/' +CustomObject.Account__c + ' > CustomObject.Account__c </a>.

I trid this also

   'The Account Message can be found on the Account here <a href = https://domain.com/' +CustomObject.Account__r.Name + ' > CustomObject.Account__r.Name </a>.

  

 

My Problems is:  Account Name(CustomObject.Account__r.Name) is not displayed with the hyperLink.

 

can anyone help. Thanks in advance

 

Hi,

Upon the deletion of  my custom object(whose parent is Account), My trigger should send out an email alert.

What i have done is: 

  1. i have a mail template(AlertTemplate) created

               Account Name:{!Account_Message__c.Account__r.Name}
               Account Message: {!Account_Message__c.Name}
              Created By: {!Account_Message__c.CreatedBy}
              Last Modified By: {!Account_Message__c.LastModifiedBy}
 

  2. written a trigger

  EmailTemplate templateObj = [SELECT id, Name FROM EmailTemplate WHERE Name='AlertTemplate'];
         Messaging.MassEmailMessage massMessage = new Messaging.MassEmailMessage();
         massMessage.setTargetObjectIds(targetObjIds);
         massMessage.setTemplateId(templateObj.Id);
         massMessage.setSaveAsActivity(false);
         massMessage.setSenderDisplayName('My Portal');
         massMessage.setUseSignature(false);
         massMessage.setReplyTo('no-reply@saleforce.com');
         Messaging.sendEmail(new Messaging.MassEmailMessage [] { massMessage });

    

The Problem is: i am getting email alert, but   Object values (for Account Name, Account Message, createdBy, Last ModifiedDate)   are not displayed in the body of the mail.

 

 Can any one please let me know

Hi,

 

I am trying to create a new button and append this button to an existing button row on a related list, but have not been successful as of yet.  The issue is that the <td> tag that I'm trying to append the button to has no ID attribute and has only a className attribute that is shared by other <td> tags on the page making it impossible to find the correct tag.

 

Any suggestions on how to append the custom button?

 

Thanks,