You need to sign in to do that
Don't have an account?
Nuevo9763
Is process builder the solution for this situation?
First of all I am a newbiew and have not used process builder. Is using process builder the right approach for the follwong?
I have a collection of custom object named 'Song', which goes through the following
stages in the same order.
written --> Composed --> Recorded --> Released
For each of these stages I have:
Song Written Date
Song Composed Date
Song Recorded Date
Song Released Date
I have to display the current status in a new field. IF song is recorded on 9/2/2017
and released 9/24/2017 the status would display the latest status 'Released on
9/24/2017' and would disregard any earlier stages.
Now when I have a collection of songs and I need to dispaly the status which shows the
earliest date.For example in the collection,
Song One has:
Song Written Date - 8/2/2017
Song Composed Date - 9/1/2017
Song Recorded Date -
Song Released Date
Song two has:
Song Written Date - 8/2/2017
Song Composed Date - 9/1/2017
Song Recorded Date - 9/18/2017
Song Released Date
Then in the above example the status should disply 'Composed on 9/1/2017'
Which is the earliest date between two songs and the latest for song one.
Is this possible to implement using process builder or workflow rule field update? Or
the only way is apex trigger? We want to avoid apex code if possible.
I have a collection of custom object named 'Song', which goes through the following
stages in the same order.
written --> Composed --> Recorded --> Released
For each of these stages I have:
Song Written Date
Song Composed Date
Song Recorded Date
Song Released Date
I have to display the current status in a new field. IF song is recorded on 9/2/2017
and released 9/24/2017 the status would display the latest status 'Released on
9/24/2017' and would disregard any earlier stages.
Now when I have a collection of songs and I need to dispaly the status which shows the
earliest date.For example in the collection,
Song One has:
Song Written Date - 8/2/2017
Song Composed Date - 9/1/2017
Song Recorded Date -
Song Released Date
Song two has:
Song Written Date - 8/2/2017
Song Composed Date - 9/1/2017
Song Recorded Date - 9/18/2017
Song Released Date
Then in the above example the status should disply 'Composed on 9/1/2017'
Which is the earliest date between two songs and the latest for song one.
Is this possible to implement using process builder or workflow rule field update? Or
the only way is apex trigger? We want to avoid apex code if possible.
If I understand correctly, Song one should dispaly current status as 'Composed on 9/1/2017' and Song two should display current status as 'Recorded on 9/18/2017. Is my understanding correct ?
Thanks.
There is no need of process builder to achieve this.This can be done using the formula fields .
I tried out this and achieved using the two formula fields,this can be done in one field also.
1. Create a formula field name 'Current Status Date' as follows,
This field is not visible in page layout.
2. Create another formula field Which displays the current (latest) status with date .Criteria as, This which gives your targeted output as
Formula field is better,since it reevaluates every time.So we get updated status,in less effort.
If you have any queries ,please free to ask.
Mark as the best answer, if this helped you.,it can be useful to others also.
Regards,
Sachin P Sam
Song One has:
Song Written Date - 8/2/2017
Song Composed Date - 9/1/2017 - should be the status, which is the earliest date between two songs and the latest for song one.
Song Recorded Date -
Song Released Date
Song two has:
Song Written Date - 8/2/2017
Song Composed Date - 9/1/2017
Song Recorded Date - 9/18/2017
Song Released Date
Then in the above example the status should disply 'Composed on 9/1/2017'. I think the only way to work on a collection is adding apex code in trigger. Do you think there is any other way?
your answer is good, but not applicable in this case as when there is a collection of songs, I need to show the status of the song which is at the earliest stage. Please see the example above my reply to Neha. I think the only way to work on a collection is adding apex code in trigger. Do you think there is any other way?
If you need to perform action based on collection of songs,you need to use apex code.
Regards,
Sachin P Sam