• Kalai Arumugam
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 7
    Replies
We sell hardware products and becomes Asset for our customer. In some scenarios, we replace their assets for different reasons. In those situations, I would still like to see the related records mapped with old assets as well.
Email Template:
<messaging:emailTemplate subject="Milestone:{!relatedTo.MilestoneType.Name} - yet to complete" recipientType="Contact" relatedToType="CaseMilestone">
<messaging:htmlEmailBody ><br/><br/><br/>
*** Milestone Warning **** <br/><br/>
<c:MSCaseDetails MScaseId="{!relatedTo.CaseId}"/><br/>
Milestone Name: {!relatedTo.MilestoneType.Name}<br/>
Target Date: {!relatedTo.TargetDate}<br/>
Elapsed Time (Mins): {!relatedTo.ElapsedTimeInMins}<br/>
Time Remaining (Mins): {!relatedTo.TimeRemainingInMins}<br/><br/>
Case reference: https://cs42.salesforce.com/{!relatedTo.CaseId} <br/><br/><br/>
Kindly remember to complete the milestone before it expires.<br/><br/><br/>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
VF Componenet::
​<apex:component controller="FindCaseDetails" access="global">      
    <apex:attribute name="MScaseId" description="testing" type="Id" required="required" assignTo="{!caseId}"/>
    Case#: <apex:outputField value="{!CaseDetails.CaseNumber}"/> <br/>    
    Assigned To: <apex:outputField value="{!CaseDetails.Owner.Name}"/>
</apex:component>
Contoller:
public class FindCaseDetails {
    public static Case cs;
    public static Id caseId {get;set;}

	public FindCaseDetails() {
	}

	public Case getCaseDetails() {
        cs  = [select CaseNumber, Owner.Name from Case where id =:caseId];
		return cs;
	}
   
}
Here is my setup to trigger a warning for a case milestone. I'm getting the alert by it has no MileStone Information in it. Alert I received upon milestoine warning is, where the CaseMilestone details are missing here,
Subject: Sandbox: Milestone: - yet to complete

Email Body:
*** Milestone Warning **** 

Case#:00076658 
Assigned To:New Cases
Milestone Name: 
Target Date: 
Elapsed Time (Mins): 
Time Remaining (Mins): 

Case reference: https://cs42.salesforce.com/ 


Kindly remember to complete the milestone before it expires.
But, when I test the email template manually from EmailTemplate page, it will ask me to enter,
Contact ID: <contact ID> and CaseMilestone ID: <milestone ID>.
And this works as expected, output:
*** Milestone Warning **** 

Milestone Name: Main Category Set
Target Date: Wed Jun 22 19:30:20 GMT 2016
Elapsed Time (Mins): 
Time Remaining (Mins): 00:00

Case reference: https://cs42.salesforce.com/500560000037EGyAAM 


Kindly remember to complete the milestone before it expires.

Someone please let me know, why the alert is not displaying the milestone details during the actual execution.


 
Custom button on the top is not working whereas the bottom button on the same page works fine. I'm the admin and have all the access to the objects here. Tried in different browsers Chorome, IE latest verions, same issue.
{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")} 

if ('{!Sales_Order__c.Status__c}' == 'Ready for Review' ) {

sforce.apex.execute("CreateOrder","SendApprovalRequest", {orderid:"{!Sales_Order__c.Id}"}); 
alert('Record sent for approval');
window.location.reload();

}
else{
alert('You can not Submit for Approval when status is in Draft');
}

 
Using Javascript, I'm trying to close a sub tab upon 'Cancel' operation is not working in Chrome(47.0.2526.73 m). It's works absolutely fine in Friefox(v 42.0).

I'm using 'Cancel' from the follwoing visual force page in chrome/Firefox:(works fine in both)
https://csxx.salesforce.com/apex/selectActionVFPageNew?caseid=xxxx9000000vaar

Trying the same from, Agent panel(console):
https://csxx.salesforce.com/console?tsid=xxuC0000000wBhj
In Firefox - works fine
In Chrome - doesn't do anything
But, I can see an error in JS console,
"Scripts may close only the windows that were opened by it."

Can someone help me to fix this.
I want to add two fieldssets from different custom objects in a single vf page. I tried using custom contoller with wrapper class, but I could not able to refer the object's fieldsets. Pls share your inputs.
I could not able to set debug levels from my developer console. The 'Change Log Levels' page keep loading forever. Tried many times.
In the screen, I can see information for 'General Trace Settings for you' but, not for 'Class and Trigger Trace Overrides', also 'loading...' above the screen. I could not able to see the logs I prined in my class because of this issue.

I did try enabling the log levels from Setup->Debug Logs, but no luck.

Can some one help me with this?



 
We sell hardware products and becomes Asset for our customer. In some scenarios, we replace their assets for different reasons. In those situations, I would still like to see the related records mapped with old assets as well.
Custom button on the top is not working whereas the bottom button on the same page works fine. I'm the admin and have all the access to the objects here. Tried in different browsers Chorome, IE latest verions, same issue.
{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")} 

if ('{!Sales_Order__c.Status__c}' == 'Ready for Review' ) {

sforce.apex.execute("CreateOrder","SendApprovalRequest", {orderid:"{!Sales_Order__c.Id}"}); 
alert('Record sent for approval');
window.location.reload();

}
else{
alert('You can not Submit for Approval when status is in Draft');
}

 
Using Javascript, I'm trying to close a sub tab upon 'Cancel' operation is not working in Chrome(47.0.2526.73 m). It's works absolutely fine in Friefox(v 42.0).

I'm using 'Cancel' from the follwoing visual force page in chrome/Firefox:(works fine in both)
https://csxx.salesforce.com/apex/selectActionVFPageNew?caseid=xxxx9000000vaar

Trying the same from, Agent panel(console):
https://csxx.salesforce.com/console?tsid=xxuC0000000wBhj
In Firefox - works fine
In Chrome - doesn't do anything
But, I can see an error in JS console,
"Scripts may close only the windows that were opened by it."

Can someone help me to fix this.
I want to add two fieldssets from different custom objects in a single vf page. I tried using custom contoller with wrapper class, but I could not able to refer the object's fieldsets. Pls share your inputs.
I could not able to set debug levels from my developer console. The 'Change Log Levels' page keep loading forever. Tried many times.
In the screen, I can see information for 'General Trace Settings for you' but, not for 'Class and Trigger Trace Overrides', also 'loading...' above the screen. I could not able to see the logs I prined in my class because of this issue.

I did try enabling the log levels from Setup->Debug Logs, but no luck.

Can some one help me with this?