I agree with you, as I tried few modifications to my code in detail_alg.htmpl file but to no luck yet. See below for my existing code that throws out the error on the activity form when tried to edit and update the work type field but works fine on New Labor Activity form to add a Work Type.
Part 1 -
<PDM_MACRO name=dtlTextbox hdr="Time Spent" attr=time_spent evt="onBlur='validate_duration_ts(this)'" maxlength=100>
Added the below code under the "Time Spent" line.
<PDM_IF "$args.type" == "LBR">
<PDM_IF "$prop.form_name_3" == "edit" && "$env.NX_ACTIVITY_LOG_SECURITY" == "WRITE_NEW">
<PDM_MACRO name=dtlStartRow>
<PDM_MACRO name=dtlLookupReadonly hdr="Work Type" attr=zWork_Type link=yes>
<PDM_ELSE>
<PDM_MACRO name=dtlStartRow>
<PDM_MACRO name=dtlLookup hdr="Work Type" attr=zWork_Type autofill="no" factory="zWork_Type" link=yes make_required=yes>
</PDM_IF>
</PDM_IF>
Part 2 -
<PDM_MACRO name=dtlTextbox hdr="Time Spent" attr=alg.time_spent evt="onBlur='validate_duration_ts(this)'" maxlength=100>
Added the below code under the "Time Spent" line.
<PDM_MACRO name=dtlStartRow>
<PDM_IF "$args.alg.type.code" == "LBR">
<PDM_MACRO name=dtlDropdown hdr="Work Type" attr="alg.zWork_Type" factory="zWork_Type" make_required="yes">
</PDM_IF>