Linked SFM and SVMX.CURRENTRECORDHEADER
SVMX.CURRENTRECORDHEADER is an SFM Literal, which refers to the ‘HEADER’ of the ‘CURRENT’ (i.e. child) ‘RECORD’. It applies as a prefix, with the suffix being ‘.’ followed by the API Name of a field in the ‘HEADER’ object.
This literal is used in the OOTB linked SFM Manage Work Details for Products Serviced.
Key Purpose
The purpose of this usage is as follows:
When an SFM transaction is defined with header and child objects, the relationship between the header and child objects is automatically saved in the SFM transaction configuration. So, when such an SFM transaction is launched and saved in SFM Delivery, the new child records automatically have a reference to the header record. Note that header and child objects need not be master and detail objects. They can have their relationship defined using a lookup field to the header object, in the child object.
As an example, in the primary SFM transaction Add/Edit Products Serviced, the Work Order field in Work Detail record is automatically populated and saved, for each record added in the Lines section Products Serviced.
In the secondary SFM transactionManage Work Details for Products Serviced, the header and child objects are both Work Detail. So, for every record added in any of the Lines sectionsParts , Labor, Expenses, and Travel, the Work Detail field is automatically populated and saved.
However, Work Detail is technically a detail object of Work Order. So, a Work Detail record cannot be saved without the Master-Detail field Work Order being populated. In the above case, the SFM transaction configuration does NOT include automatic reference from Product Serviced Work Detail (header) record’s Work Order field value to Parts/Labor/Expenses/Travel Work Detail (child) records’ Work Order field.
So, in order to configure this reference explicitly, the SFM literal SVMX.CURRENTRECORDHEADER is used.
The usage of this literal in the value map for the new child records in the Lines sections is as follows:
Parts/Labor/Expenses/Travel Work Order field – Mapped to value – SVMX.CURRENTRECORDHEADER.SVMXC__Service_Order__c
CURRENTRECORD here refers to the Parts/Labor/Expenses/Travel record.
CURRENTRECORDHEADER refers to the Products Serviced Work Detail record, which is the ‘header’ of the above child records, in the linked SFM transaction.
CURRENTRECORDHEADER.SVMXC__Service_Order__c refers to the ‘header’ Products Serviced Work Detail record’s Work Order field value.
Thus, the above explicitly configured reference populates the Work Order field in the newly created child records in the linked SFM transaction and allows these records to be saved successfully.
As can be seen, the use of this literal in the linked SFM transaction is because of the header and child objects (both Work Detail) not being master and detail objects. So, usage of this literal is not mandatory for linked SFM transactions and depends on the objects configured in the SFM transaction definition.
* 
SVMX.CURRENTRECORDHEADER literal can also be used to map any other fields from the ‘header’ Work Detail record (Products Serviced) to the new ‘child’ Work Detail records (Parts/Labor/Expenses/Travel).
The Linked SFM button is also enabled for newly created lines.
Was this helpful?