• rakesh muppiri
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies

Parent: Account

Child: Payment__c

 

trigger myPaymentTrigger on Payment__c (before delete, before insert, after update) {

 

List<Payment__c> obj =new List<Payment__c>();

 

//Account a = new Account();

 

 if(trigger.isInsert || trigger.isUpdate){

   obj = trigger.new;

   Account a = ; //Here i want to write Query that should return Parent Account of Payment__c

}

  if (trigger.isDelete) { }

}

Parent: Account

Child: Payment__c

 

trigger myPaymentTrigger on Payment__c (before delete, before insert, after update) {

 

List<Payment__c> obj =new List<Payment__c>();

 

//Account a = new Account();

 

 if(trigger.isInsert || trigger.isUpdate){

   obj = trigger.new;

   Account a = ; //Here i want to write Query that should return Parent Account of Payment__c

}

  if (trigger.isDelete) { }

}

Hey guys,

 

I want to broadcast a message to all our SF users whenever they log into the org, something similar to Salesforce Maintenance pop up.

 

So the user logs into the org and the first thing he/she sees is a pop up screen. Basically, I want to display an IFRAME to all users whenever they log into the SF. After user see the popup then I will send the user to the main screen so he can continue his work.

 

I'm not sure whether there is a method or function that I can call in a SControl or a Visualforce page.

 

Any help is appreciated.

 

  • April 04, 2011
  • Like
  • 0
Hi I have the following code (below)... What I am trying to do is insert a new record or Case from a button without letting the user know on a particular ticket reason and detail... Now the code tells me it works... but I do not see any cases created when I refresh the ticket screen... does anyone know where am I wrong....Later I will override a the close button and place this s-control in...
Code:
<html> 
<head> 
<script type="text/javascript" language="javascript" src="/js/functions.js"></script> 
<script type="text/javascript" src="/soap/ajax/10.0/connection.js"></script> 
<script type="text/javascript"> 


function cCreate() { 

var cReason = "{!Case.Reason}"; 

var cDetail="{!Case.Reason_Detail__c}";

var cAccount = "{!Case.Account}";

var newURL="{!URLFOR( $Action.Case.CloseCase , Case.Id,[retURL=$Request.retURL] ,true)}" ; 



if (cReason=="Lockbox Request")
{
if (cDetail=="Fee") 
{ 
//Disable the Close button 
var cCase = new sforce.SObject("Case");
cCase.Paperwork_Incoming__c = "{!Case.Paperwork_Incoming__c}" ;
cCase.Account ="{!Case.Account}" ;
cCase.Status = "New";
cCase.Reason= "Lockbox Fee";
cCase.Subject= "{!Case.Subject}";
cCase.Description="{!Case.CaseNumber}";
  sforce.connection.create([cCase ]);
alert("done");
} 
else 
{ 
//Redirect to Close Edit Page 
alert("You Can not do this"); 
//window.parent.location.replace(newURL); 


} 
}
} 
</script> 
<style> 

.btn, .button, .formulaButton, .btnWhatsNew { 
font-family: 'Verdana', 'Geneva', sans-serif; 
background-repeat: repeat-x; 
background-position: left top; 
border-right:1px solid #5C5D61; 
border-bottom:1px solid #5C5D61; 
border-top:none; 
border-left:none; 
font-size: 80%; 
color:red; 
padding:1px 3px 1px 3px; 
cursor:pointer; 
font-weight:bold; 
display:inline; 
} 
</style> 
</head> 
<body> 
<form> 
<INPUT TYPE="button" class="btn" NAME="myButton" VALUE="Test" onClick="cCreate();"> 
</form> 
</body> 

</html>

 Thank You for your help
zishan