• Esmeralda Canoog 3
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 8
    Replies
Hi All,

I'm not that good with writing codes and I need help on creating a trigger for a rollup summary (Lookup relationship). I have created this in flows but unfortunately, it doesn't work well if there is a huge amount of batch upload . Below are the details:

Sales Discount and FNR object are in look relationship

Sales Discount - Parent and below are fields that we need to pupulate the summarize value:
May A - Number field
May B - Number field
May C - Currency Field
June A - Number field
June B - Number field
June C - Currency Field
July A - Number field
July B - Number field
July C - Currency Field

Etc. until month of December



FNR Object - Child Object of Sales Discount


Months - Picklist field (may, june, july, until Dec.)
A - Number field
B - Number Field
C - Currency Field


Logic is. If (Picklist) months field is May and A, B, C, has a value, it will automatically summarize and be populated in the fields under Salesdiscount which is May A, May B, May C. Same logic with other months like june , july, until december. If the Fnr is deleted,  there's a recalculation of the summarize value as well.

Amy help will be much appreciated.

Thanks
I have a custom button created in the object called CM and this button execute javascript, content source is onclick javascript: Name of the button is Print and "Print_CM" here is a VF page. See below

CM_Status__c ,'Cancelled')} && !{!ISPICKVAL( Credit_Memo__c.SFCM_Status__c ,'Reversed')} && !{!ISPICKVAL( Credit_Memo__c.SFCM_Status__c ,'Disapproved')}) 

window.location.href = "https://" + window.location.host + "/apex/Print_CM?id=" + "{!Credit_Memo__c.Id}";
} else {
alert("Error: This Credit Memo cannot be printed.") 
}

Now I'm trying to add this button in my existing VF page and let's call it "CM View".

I'm trying to add it as  <apex:commandbutton but not sure how to do it. I know that I need to add something from the existing controller to call it in the CM View VF page, but I'm not sure how to do it well.

Any help will be much appreciated.

Thanks in advance guys :)
Hi All,

I'm not that good with writing codes and I need help on creating a trigger for a rollup summary (Lookup relationship). I have created this in flows but unfortunately, it doesn't work well if there is a huge amount of batch upload . Below are the details:

Sales Discount and FNR object are in look relationship

Sales Discount - Parent and below are fields that we need to pupulate the summarize value:
May A - Number field
May B - Number field
May C - Currency Field
June A - Number field
June B - Number field
June C - Currency Field
July A - Number field
July B - Number field
July C - Currency Field

Etc. until month of December



FNR Object - Child Object of Sales Discount


Months - Picklist field (may, june, july, until Dec.)
A - Number field
B - Number Field
C - Currency Field


Logic is. If (Picklist) months field is May and A, B, C, has a value, it will automatically summarize and be populated in the fields under Salesdiscount which is May A, May B, May C. Same logic with other months like june , july, until december. If the Fnr is deleted,  there's a recalculation of the summarize value as well.

Amy help will be much appreciated.

Thanks
I have a custom button created in the object called CM and this button execute javascript, content source is onclick javascript: Name of the button is Print and "Print_CM" here is a VF page. See below

CM_Status__c ,'Cancelled')} && !{!ISPICKVAL( Credit_Memo__c.SFCM_Status__c ,'Reversed')} && !{!ISPICKVAL( Credit_Memo__c.SFCM_Status__c ,'Disapproved')}) 

window.location.href = "https://" + window.location.host + "/apex/Print_CM?id=" + "{!Credit_Memo__c.Id}";
} else {
alert("Error: This Credit Memo cannot be printed.") 
}

Now I'm trying to add this button in my existing VF page and let's call it "CM View".

I'm trying to add it as  <apex:commandbutton but not sure how to do it. I know that I need to add something from the existing controller to call it in the CM View VF page, but I'm not sure how to do it well.

Any help will be much appreciated.

Thanks in advance guys :)