SFM Transaction for Creating Dependency Management Group
To create and set up SFM transactions for dependency management group creation:
1. Create an SFM transaction with the following configuration. For information about creating SFM transactions, see How to Create an SFM Transaction.
a. Select the transaction type as To create new Target records from Source records and add new Child records.
b. In the Properties tab:
Field
Description or Value
Name*
Specify a suitable name for the SFM transaction. For example, Dependency Group Creation.
Tags
Add suitable tags.
Description
Enter a description for the SFM transaction.
c. In the Objects and Mapping tab:
Field
Description or Value
Source Object
Select Dependency Management.
Target Object
Select Work Order Dependency.
d. In the Layout Editor tab:
Field
Description or Value
Header fields (Dependency Management Object)
Dependency Group Name, Description
Detail fields (Work Order Dependency Object)
Primary Work Order, and Secondary Work Order – Mandatory fields, Resource Dependency, Time Dependency, Minimum Time Deviation, Minimum Time Deviation Units, Maximum Time Deviation, Maximum Time Deviation Units
e. In the Data Validation Rules tab, specify the validation rules for your SFM transaction. The validation rules help you to configure the behavior of dependency group creation as required for your organization. Consider the following scenarios:
Work orders associated with different territories or dispatch processes should not be allowed to be added to a single dependency group.
Work orders with the status Dispatched should not be allowed to be added to any dependency group.
When Start Unison or Finish Unison is selected in the Time Dependency field, the Minimum Time Buffer field should automatically populate zero as the value.
The validation rules ensure that the dependency groups are meaningful, and do not cause errors when the work orders in the group are scheduled by the optimizer. For example, configure the following validation rule to restrict users from selecting the same work order in primary and secondary work order fields.
Target Object: Work Order Dependency
Expression1: Primary Work Order – Equals – Field – Secondary Work Order
Message Type: Error
Default Message: <Message to indicate that primary and secondary work orders should not be the same>
2. Create a Visual Force page with the following information:
a. To create a Visualforce page, go to Force.com Developer Console and select File > New > Visualforce Page.
b. Enter the following snippet on the new page:
<apex:page standardController="SVMXC__Dependency_Management__c" extensions="COMM_Controller" tabStyle="SVMXC__Dependency_Management__c" showheader="true" action="{!CreateDependency}" />
c. Edit the COMM_Controller Apex Class and add the following method:
public PageReference CreateDependency()
{
try
{
return RedirectTo('Dependency_Management__c','&lt;Name of the VF page created above ');
}catch(Exception ex)
{
throw ex;
}
}
3. Override the New button on the Dependency Management page layout with the above SFM:
a. Navigate to Salesforce Setup > Custom Objects > Dependency Management.
b. In the Dependency Management object page, go to the Buttons, Links, and Actions section and edit the New link.
c. Click the Visualforce page checkbox and Select the Visualforce page you created.
d. Navigate to Salesforce Setup > App Setup > Develop Visualforce Page > New.
e. Enter the following code under the Visualforce Mark-up tab:
[Apex]<apex:page standardController="SVMXC__Dependency_Management__c" extensions="COMM_Controller" tabStyle="SVMXC__Dependency_Management__c" showheader="true" action="{!CreateDependency}" />
Was this helpful?