updating parent bc depending on the status of child bc

4
http://siebel -learnings.blogspot.com Page 1 Siebel CRM: Updating parent BC depending on the status of child BC using configuration In this case y Parent BC: Service Request y Child BC: Action Requirement: When all the Actions corresponding to an SR are closed the SR status should be Closed Solution: In this case we will take the count of child records on the parent BC. There will be two counts count of all child records and count of Closed child re cords. When this two counts are equal we will change the status of parent BC to closed. 1. Create a new link between Service Request and Action BC with Search Spec [Status]=LookupValue('EVENT_STATUS', 'Closed') in this case with name Service Request/Action1 2. Add this link in the MVL of Service Request BC in this case wi th MVL name Action1 3. Create two calculated fields to get number of records fetched by each link. When the count returned by both the links is equal, all the A ctivities are closed, and we can change the SR status to Closed.

Upload: diptesh-sarnaik

Post on 07-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Updating Parent BC Depending on the Status of Child BC

8/6/2019 Updating Parent BC Depending on the Status of Child BC

http://slidepdf.com/reader/full/updating-parent-bc-depending-on-the-status-of-child-bc 1/4

http://siebel-learnings.blogspot.com Page 1

Siebel CRM: Updating parent BC depending on the status of child BC using configuration

In this case

y P arent BC: Service Requesty Child BC: Action

Requirement: When all the Actions corresponding to an SR are closed the SR status should be Closed

Solution: In this case we will take the count of child records on the parent BC. There will be two countscount of all child records and count of Closed child records. When this two counts are equal we willchange the status of parent BC to closed.

1. Create a new link between Service Request and Action BC with Search Spec[Status]=LookupValue('EVENT_STATUS', 'Closed') in this case with name ServiceRequest/Action1

2. Add this link in the MVL of Service Request BC in this case with MVL name Action1

3. Create two calculated fields to get number of records fetched by each link. When the countreturned by both the links is equal, all the Activities are closed, and we can change the SR statusto Closed.

Page 2: Updating Parent BC Depending on the Status of Child BC

8/6/2019 Updating Parent BC Depending on the Status of Child BC

http://slidepdf.com/reader/full/updating-parent-bc-depending-on-the-status-of-child-bc 2/4

http://siebel-learnings.blogspot.com Page 2

4. F or testing you can show these two fields in UI in applet.5. On the Action BC create a new user property On F ield Update Invoke 1 . This user property will

call the method CheckClosed from Service Request BC when the Status field from Action BCis updated.

6. On the Service Request BC add a new user property Named Method with the following value.When the method CheckClosed is called it will check if the count returned by both the links isequal, if yes it will set the Service Request Status to Closed else nothing."CheckClosed", "SET", "Status", "IIf ([Calc Activity Status] = [Calc ActivityStatus1],LookupValue('EVENT_STATUS', 'Closed'),[Status])"

Page 3: Updating Parent BC Depending on the Status of Child BC

8/6/2019 Updating Parent BC Depending on the Status of Child BC

http://slidepdf.com/reader/full/updating-parent-bc-depending-on-the-status-of-child-bc 3/4

http://siebel-learnings.blogspot.com Page 3

7. Compile all the above items and check the configuration by creating new Activities and closingthem.

8. You will observe that the parent BC is not getting refreshed properly and thus the configurationis not working as expected.

9. So add a new user property Named Method to the Service Request BC. P lease note that this

user property should be called before the Closing step 6. Named Method 2 will be called beforeNamed Method 3 in this case.The value for this user property is as below"CheckClosed", "INVOKE", "Service Request", "RefreshBusComp"When the method CheckClosed is called it will invoke the method RefreshBusComp onService Request BC.

10. Compile the Service Request BC again and test the results, everything should work smoothly.

Page 4: Updating Parent BC Depending on the Status of Child BC

8/6/2019 Updating Parent BC Depending on the Status of Child BC

http://slidepdf.com/reader/full/updating-parent-bc-depending-on-the-status-of-child-bc 4/4

http://siebel-learnings.blogspot.com Page 4