• SCh9
  • NEWBIE
  • 0 Points
  • Member since 2018

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

I have a custom field - Prod_Value_Currency_Field__c on Products standard object and 2 formula fields each on OppProducts (OLI_Value__c) and Assets(Asset_Value__c) which takes the value of the related Product's Prod_Value_Currency_Field__c . 
I need two roll up summary fields at the Opportunity and Account objects level. So, I wrote two workflow rules, each on OppProds and Assets to copy the value of OLI_Value__c and  Asset_Value__c so that I can do a roll up summary on the Opp (SUM(COPY_of_OLI_Value__c )) and its Account(SUM(COPY_of_Asset_Value__c )).
This will work if there are no changes to the "Prod_Value_Currency_Field__c " value.
-----------------------
Now the "Prod_Value_Currency_Field__c" changes often (gets updated via dataloader) on Products , my formula fields will get updated but the copy fields will not. I am trying to find a way to track the changes in "Prod_Value_Currency_Field__c"  to update the copy fields on OLIs and Assets.   
(1. I cannot track changes of formula fields in WFR as formula fields are not stored in database and also 
2. cannot track changes of cross object fields in WFR (cannot track changes in Prod_Value_Currency_Field__c at Product level in OppProductsWFR and Assets WFR ))


Can anyone suggest a way/give clue to get around this problem here?  
Thanks for your time.
  • July 25, 2018
  • Like
  • 0

Hello,

I am looking to 
Get the most recent (closedWon) Renewal opportunity  of an Account and see if  customField (NetValue) on that Opportunity is greater than 0.

If O2 is the mose recent closedwon ContractRenewal Opp on Account 'X'. Update field "Expansion" value to 
YES  -  if  O2.NetValue  >  0
NO   -  if  O2.NetValue <= 0

("NetValue" is custom field on Opportunity
"ExpansionReduction" is custom field on Account)

Would need help with code to this problem *without using any third party app*. My approach is -
Get OppID  where MAX(CloseDate) looping through each Opp of that Account.
Trigger on Account which updates "Expansion" field on Account whenever a new Renewal Opp of Account reaches closed won 

Please correct me if I am wrong.

Thank you.
  • January 20, 2018
  • Like
  • 0
I am trying to achieve a solution for the following problem -
For each Account, I want to know the assets of an account belongs to how many different productGroups (to see products belonging to how varied of product groups each Account(Client) is buying from us)
ProductGroup is a formula field on Assets which gets the value from Products object ( ProductGroup is a picklist on Products)


For example,
If I have, Product groups - P1, P2, P3, P4, P5; Assets - A1, A2, A3, A4 and A1, A2, A4 --> P1 A3 --> P4
I want the count to be 2 because all the assets of this account belongs to 2 different product groups.
From this, I would know Account X is buying our products from 2 productGroups.


My approach - To get the no. of assets in each productGroup, my approach would be for each picklist value in Product Group, using SOQL query , SELECT COUNT(AssetID) from Assets__c GROUP BY Product_Group__c
For each productGroup, get the number of records where the above mentioned countVariable is > 0
Copy this value on to a new custom field(BreadthOfAssets) on Account object.

Am I right?
Do i need to write a trigger on Asset or Account for this and need help  in coding this.
Thank you
  • January 20, 2018
  • Like
  • 0
I am trying to find a solution to get the average time taken to close the 5 most recently closed cases on each Account and copy that value on to a custom field at the Account object level. I will be using this information to see if there is a timely resolution of cases logged on each account.
 
My idea of approach to this problem -
I have created a formula field on Cases object to calculate time taken in hours to close the case. I would use a SOQL query to get the 5 most recent cases (order by ClosedDate DESC LIMIT 5) for each account. Can we achieve a solution to get the average time at the Account level using standard salesforce features (process builder, flows etc.,) without going for custom code ? If it has to be custom code, is Trigger a solution here ?
 
Can anyone please give any inputs/ suggestions/ ideas ?
Thank you.
 
  • January 17, 2018
  • Like
  • 0

Hello. I am a newbie to Salesforce. 
I am trying to find a solution or how to design a solution to get the average time (in hours) taken to close the 5 most recently closed cases on to a custom field at the Account object level. I will be using this information to see if there is a timely resolution of cases logged on each account. 

My idea of approach to this problem - 
I have created a formula field on Cases object to calculate time taken in hours to close the case. I would use a SOQL query to get the 5 most recent cases (order by ClosedDate DESC LIMIT 5) for each account. Can we achieve a solution to get the average time at the Account level using standard salesforce features (process builders, flows etc.,) without going for custom code ? If it has to be custom code, is Trigger a solution here ?

Can anyone please give any inputs/ suggestions/ ideas ?

Thank you.

  • January 16, 2018
  • Like
  • 0
I am trying to find a solution to get the average time taken to close the 5 most recently closed cases on each Account and copy that value on to a custom field at the Account object level. I will be using this information to see if there is a timely resolution of cases logged on each account.
 
My idea of approach to this problem -
I have created a formula field on Cases object to calculate time taken in hours to close the case. I would use a SOQL query to get the 5 most recent cases (order by ClosedDate DESC LIMIT 5) for each account. Can we achieve a solution to get the average time at the Account level using standard salesforce features (process builder, flows etc.,) without going for custom code ? If it has to be custom code, is Trigger a solution here ?
 
Can anyone please give any inputs/ suggestions/ ideas ?
Thank you.
 
  • January 17, 2018
  • Like
  • 0

Hello. I am a newbie to Salesforce. 
I am trying to find a solution or how to design a solution to get the average time (in hours) taken to close the 5 most recently closed cases on to a custom field at the Account object level. I will be using this information to see if there is a timely resolution of cases logged on each account. 

My idea of approach to this problem - 
I have created a formula field on Cases object to calculate time taken in hours to close the case. I would use a SOQL query to get the 5 most recent cases (order by ClosedDate DESC LIMIT 5) for each account. Can we achieve a solution to get the average time at the Account level using standard salesforce features (process builders, flows etc.,) without going for custom code ? If it has to be custom code, is Trigger a solution here ?

Can anyone please give any inputs/ suggestions/ ideas ?

Thank you.

  • January 16, 2018
  • Like
  • 0