• RajKumaR M
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 3
    Questions
  • 17
    Replies
Hi,

I wrote a trigger that updates the field value from one object to another object. I need to reflect the filed value for all the object records if i entered the value in another object.

Object A - Custom Field 1
Object B - Custom Field 2.

I need to reflect "Custom Field 2" from the Object B to all the records in Object A - Custom Field 1.

How can i achive this?
Hi All,

I have scenario to calculate the sum of child amount in Parent opp.

I have created trigger its working for Insert and update its not  working in Isdelete();

Can anyone help on this?

The following code which is worked for isinsert() and isupdate() and not updated in Isdelete.

trigger opprollup on Opportunity (after insert, after update,after delete)
{
  
   Set<Id> oppIds = new Set<Id> ();
     Set<Id> poppIds = new Set<Id> ();
   Public List <Opportunity > opps = new List<Opportunity >();
     Public List <Opportunity > popps = new List<Opportunity >();
   List <AggregateResult> groupedResults  = new List<AggregateResult>();
   
    
if(trigger.isInsert || trigger.isUpdate)
{
           for(Opportunity opp:trigger.new)
           {
             oppIds.add(opp.Parent_Opportunity__c );
            }
            opps = [Select Id,amount From Opportunity  Where Id In :oppIds  ];
            groupedResults  = [SELECT SUM(Amount) FROM Opportunity where Parent_Opportunity__c IN:oppIds];

  for(integer j=0; j<groupedResults  .size(); j++ )
  
       {
         for(integer i=0; i<opps  .size(); i++ )
         {  
         opps[i].Child_Total_Amount__c=(Decimal) groupedResults[j].get('expr0');
         }
  
        }
  
   update(opps );


  }
 
if(Trigger.IsDelete )
{

          
            popps = [Select Id,amount From Opportunity  Where Id In :oppIds  ];
            groupedResults  = [SELECT SUM(Amount) FROM Opportunity where Parent_Opportunity__c IN:oppIds];

  for(integer j=0; j<groupedResults  .size(); j++ )
  
       {
         for(integer i=0; i<popps  .size(); i++ )
         {
         System.Debug('VALUEEEEEEEEEEEEEEEEE'+ popps[0].amount);
         opps[i].Child_Total_Amount__c=(Decimal) groupedResults[j].get('expr0')-popps[0].amount;
         }
  
        }
  
   update(opps );



}
 

}




Thanks in advance!

We have two custom objects. These objects have master details relationship that's why the owner of master  record is owner of child record.

 

In master we have a user look up field(Teaacher Name),based on this filed the owner field will need to update.Now the current user created by id is assigned to Record owner by default.

 

For example if we have 'John Smith' as 'Teacher name' ,we need to update owner field as 'John Smith'.WE HAVE MORE THAN 20 Teachers in our org.Work flow field update don't have the formula to do this in single work flow.

 

Is there is any alternative solution to do this Except Apex Trigger.

Thanks in Advance.

Hi,

I wrote a trigger that updates the field value from one object to another object. I need to reflect the filed value for all the object records if i entered the value in another object.

Object A - Custom Field 1
Object B - Custom Field 2.

I need to reflect "Custom Field 2" from the Object B to all the records in Object A - Custom Field 1.

How can i achive this?
I have two custom objects [access.log & trans.log] who receive daily updates [New Records] from an external system. After 31 days we don't need them anymore and we would like to delete them. Both objects have a date field on the record 'Log_date__c'.

I know that you can make a job that deletes these records on a daily basis.

My question;

- How do I write a code that deletes the right records? (Log_date__c older than 31 days)
- How/where do I put in SFDC? (Apex Class or Trigger! - Both!)

Are there any who can help me progress. In which case it will be my first code in SFDC.
In a recruiting application,a custom object called Position requires approval.
When a position record is submitted for approval,the requirements below must be met:
The hiring manager must approve the record.
The approval must be forwarded to all members of the executive team,but only one executive needs to approve the record
The VP of human resources must approve the record

How would a developer meet this requirement?
A.Create multiple approval processes,one for each executive team member,and utilize parallel submission
B.Create an approval process which utilizes parallel  approvers,but does not require unanimous approval
C.Create parallel workflow rules,requiring atleast one executive team member to complete their assigned task.
D.Create an approval process with a step for each executive team member,allowing approval steps to be skipped.
I have created a workflow on opportunity 
enrty criteria: Opportunity.name not equal to null
evaluation criteria:every time its created and edited
worflow action:field update on opportunity name
value to be set is: Recordtype.name&" " &Account.name

Problem is after the workflow fires,the opportunity name is populated with only the recordtype.name and account name seems to be blank..
is it that we can't access the account.name through opportunity in a workflow formula field?


Hi guys,
I have a image formula text field. Whenever I run the report and export it but on excel sheet it doesn't show the image. It is only showing the url where I saved the images in salesforce. Can someone please help me that how can I export image on excel sheet? Or can someone help me the alternative. Actually I was required to have color background red green and yellow for almost 6 fields with the different criteria. For example if percentage is less then 25% color background should be Red and If it is more then 75% green and between 25% to 75% Yellow background.
  • March 12, 2014
  • Like
  • 0
I need to add an hyper link to Error message on validation rule..

Could any one suggest me on this ?
I had created 4 Record Types i want to display only 2 Record Types to users and want to hide 2 record types how can i do it using security settings
Hi all,

We are sending our sales people an e-mail when they have a new opportunity. I would like to a put a link directly to the opportunity in the e-mail. Does anyone know how I can do this?

Thanks,
Erica
I need to recover a data from the formula field, so that when it is run again, the data is not changed.

I've created a formula(Merge field)on the Custom object to get owner profile name. Interestingly i could see profile value (As per  SFDC documentation) instead of profile name. For example instead of  System Admin i could see PT1.  I think this is issue with SFDC. We have work around  to get actual profile name using IF or Case. But I would like to know the actual scenario. Thank You

We have two custom objects. These objects have master details relationship that's why the owner of master  record is owner of child record.

 

In master we have a user look up field(Teaacher Name),based on this filed the owner field will need to update.Now the current user created by id is assigned to Record owner by default.

 

For example if we have 'John Smith' as 'Teacher name' ,we need to update owner field as 'John Smith'.WE HAVE MORE THAN 20 Teachers in our org.Work flow field update don't have the formula to do this in single work flow.

 

Is there is any alternative solution to do this Except Apex Trigger.

Thanks in Advance.

Hi All, In my custom object  std detailed page layout, I need to change the "Back to list". I  have searched  but I didn't get any solution. Kindly  any one tell how to change and also send me any links for this. Thanks in advance, waiting for your reply.

 

Regards,

Lavanya.

Hi All,

 

I have a inputText field in a VF page and I need to disable paste function(Ctrl+v and paste using mouse button) so that we need to compulsorily type in the text box instead of just copy pasting.

 

I have tried the following script:

<script>

function DisableCtrlKey(e)
{
    var code = (document.all) ? event.keyCode:e.which;
    // look for CTRL key press
    if (parseInt(code)==17)
    {
        alert("Please re-type your email address");
        window.event.returnValue = false;
    }
}

function DisableRightClick(event)
{
    //For mouse right click
    if (event.button==2)
    {
        alert("Please re-type your email address");       
    }
}

</script>

 and under the VF page:

<apex:inputText id="confirmemail" value="{!email}" onKeyDown="return DisableCtrlKey(event)" onMouseDown="DisableRightClick(event)" </apex:inputText>

 It works fine but I want to implement the same functionality without using alert function.

 

Can anyone please let me know any work around to accomplish the above scenario.

Any help on this will be highly appreciated.

 

 

 

I've got an updated verison of our app logo which is to be added and released.

 

Through the documents tab, I have opened up the logo document and replaced it with the new logo. I've released the new version (a major version upgrade - 1.3 to 1.4) and it has not updated my logo.

 

I had beta tested prior to the managed release but I had forgot to check the logo.

 

So why is this happening and can I change the logo via a patch upgrade?

 

Should I do it by creating a new document for the logo altogether (which would mean an entirely new major version)?

 

Thanks in advance,

Luke

Hello,

Exceeded maximum time allotted for call out (120000 ms)

I'm getting the Exceeded maximum time allotted for call out (120000 ms) error.

It seems salesforce doesn't allow more than 120 second for a single response.

I just send a 50 files (Resumes) to the resume parser in a single transaction and the resume parser take more than 120 seconds and we are getting the time exceed exceptions.

Is there is any way to resolve this.

Thanks & Regards,
Karthikeyan Chandran
I have a Force.com site set up, which will be used by un-authenticated users. My site automatically has two domians associated with it

http://mydomain.force.com
https://mydomain.secure.force.com

Since users will be making purchases (using a credit card) through this site, I would like to force them to use the secure version. The URL Redirect settings on the site don't allow me to do redirects at the domain level, however, and the documentation that I have found regarding forcing HTTPS refers to users who are logged in. 

Is there a way to redirect un-authenticated users to https://mydomain.secure.force.com when they attempt to access http://mydomain.force.com?
  • February 27, 2014
  • Like
  • 3