Siebel provides various ways of achieving the same solution, but you need to do the analysis beforehand to pick the right one. Recently I got one basic requirement that:
As soon as the Opportunity Sales Stage gets "Approved", all the Activities (Child of Opportunity) status should automatically set to "Approved".
Any Siebel Geek can offer multiple ways to achieve this solution:
1. Write a small script on "WriteRecord" event of the Opportunity business component.
2. People against scripting will not like Point#1 above and they might suggest to create a Workflow process with an Update operation on Action business component. And call this Workflow process in WriteRecord event of Opportunity or by Runtime event or by Workflow Policy.
3. Trigger a Workflow Policy when Opportunity Sales Stage = "Approved" which will call a WF Policy action with a program of type DB Operation.
I found another way of achieving the same solution (scriptless) and want to share with you. Using Data Validation Manager (DVM), you can achieve this as well. If you know how to update a field (SetFieldValue) using DVM, you might know what I am talking about.
Solution Details: 1. Navigate to Administration - Data Validation -> Rule Sets view.
2. Create a new record with the following data:
As soon as the Opportunity Sales Stage gets "Approved", all the Activities (Child of Opportunity) status should automatically set to "Approved".
Any Siebel Geek can offer multiple ways to achieve this solution:
1. Write a small script on "WriteRecord" event of the Opportunity business component.
2. People against scripting will not like Point#1 above and they might suggest to create a Workflow process with an Update operation on Action business component. And call this Workflow process in WriteRecord event of Opportunity or by Runtime event or by Workflow Policy.
3. Trigger a Workflow Policy when Opportunity Sales Stage = "Approved" which will call a WF Policy action with a program of type DB Operation.
I found another way of achieving the same solution (scriptless) and want to share with you. Using Data Validation Manager (DVM), you can achieve this as well. If you know how to update a field (SetFieldValue) using DVM, you might know what I am talking about.
Solution Details: 1. Navigate to Administration - Data Validation -> Rule Sets view.
2. Create a new record with the following data:
Name : Set Activity Approved
Business Component : Opportunity
Business Object : Opportunity
3. Drilldown on Rule Set Name.
4. Create new record under Rules view.
Sequence# : 1
Name : Set Status to Approve
Expression : [Status]="Approved"
Business Component : Action
Apply To : All Records
Return Code : Select any return code from the pick applet
5. Navigate to "Action" sub-view under the "Rules" view.
6. Create new record in Action applet:
Sequence# : 17. Create new record in "Field Values" applet
Type : Business Component
Business Component : Action
Field : Status
Value : Approved
8. Navigate to Administration - Data Validation -> Rule Sets view again and Activate the Rule set you just created.
9. Status changes to "Active".
10. Navigate to Administration - Runtime Events -> Action Sets view.
11. Create a new record:
12. Create new action record:
Name : Activity Approved
Active : True
Name : Call DVM13. Navigate to Administration - Runtime Events -> Events view.
Action Type : BusService
Sequence : 1
Active : True
Business Service Name : Data Validation Manager
Business Service Method : Validate
Business Service Contect : "Rule Set Name", "Set Activity Approved", "Enable Log", "Y"
14. Create new record:
Sequence : -1
Object Type : BusComp
Object Name : Opportunity
Event : WriteRecord
Conditional Expression : [Sales Stage]="Approved"
Action Set Name : Activity Approved
15. Reload the runtime events.
You are done.
Now this is the time to test the solution:
1. Navigate to Opportunity -> Activities View.
2. Change the Sales Stage to "Approved".
3. See the change in activities status.
One of the important thing that you might want to note here is the solution doesn't require SRF change.
ReplyDeletenice
ReplyDeleteHi Gaurav,
ReplyDeleteThanks for posting this info, I have few queries...
Firstly, While creating DVM rules we have to pick the BO and BC from the available picklist. Is This functionality available for all the custom BOs and BCs, or it is somewhat class based functionality?
Secondly, In the 4th step of the above scenario you have mentioned an expression fro Action BC while creating a rule set. What is the significance of this expression there?
Hi Anonymous,
ReplyDelete1. This functionality is applicable for all BCs.
2. The expression in the rule will identify the record set where Status is not = Approved. Please note that in DVM you have to define the negative condition, so all the activity records having Status = Approved, will be excluded.
Cheers
Gaurav
Never thought of this one. Very cool. Thanks!
ReplyDeleteHello Gaurav,
ReplyDeleteThanks for this nice post...
like this am facing one requirement.. can you please help me ?
whenever the service request is created then need to create an activity..for this you have any solution using eScripting and DVM ?
Thanks in advance
Ramesh
Hi Ramesh, for your requirement you can write the code on WriteRecord event of Service Request BC.
ReplyDelete--Gaurav
Hi Gaurav,
ReplyDeleteI Tried this on my local environment..
but it is not working, may be it works on only thin client?
Please correct me!!
Thanks in advance
Ram
Hi Gaurav,
ReplyDeleteI have to reflect changes done on Parent BC field(Date)to one Child BC field .. how it is possible
Hi Gaurav,
ReplyDeleteThanks for solution. I tried doing the same step by step, but for me, only one activity status is getting change. Also, if I select the "Immediate Display" check box below return code, it pops up a message and no activity records status gets changed.
What is the significance of this check box "Immediate Display".
Thanks,
AK
Hi AK,
ReplyDeletePlease check if you have the "Apply To" set to "All Records". Checking the "Immediate Display" field would popup the message specified in "Message" field, but here requirement is not to display the message but to update the records, so you have to keep it unchecked.
--GG
Hi Gaurav,
ReplyDeleteIn step 7, the value field you set is Approved. How do you/Siebel deal with this value in a multi-language environment?
Thanks.
Hi Anonymous,
Deletefor multilingual environment you can use LookupValue() function to deal with it.
--GG
Sorry , you cant use any Functions in Value of Action Applet. Its only Constant. So Look wont work
DeleteYes , Value column in the action applet is constant. You cannot use any function or expression in that.Actually that limits the functionality of DVM.
DeleteJeevan
this cannot be done for all records in Applet without parent condtion ...just want to set the value fpr all records in this case ..above functionality can be modified?
ReplyDeleteHi Gaurav,
ReplyDeleteI tried the above step by step but still changes are not reflected. Here we need to add some condition based on that status will change?
Please guide me what to do now.
Hi Gaurav,
ReplyDeleteThis is not working for me .This works only first child record of the parent not all child record
So can you please help me
Kind Regards
Shallet