DirPartyRelationShip
Tue Nov 19 2024 11:04:14 GMT+0000 (Coordinated Universal Time)
Saved by
@mkhassan
public static DirPartyRelationship findByChildParty(DirPartyRecId _parentParty,
DirPartyRecId _childParty,
boolean _forupdate = false)
{
DirPartyRelationship partyRelationship = null;
;
partyRelationship.selectForUpdate(_forupdate);
select firstonly partyRelationship
index hint TypeParentChildIdx
where partyRelationship.ParentParty == _parentParty &&
partyRelationship.ChildParty == _childParty;
return partyRelationship;
}
public static void lookupDependentsByParentParty(FormStringControl _formControl, DirPartyRecId _ParentParty)
{
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(DirPartyRelationship),_formControl);
Query query = new Query();
QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(DirPartyRelationship));
QueryBuildRange queryBuildRangeJournalType = queryBuildDataSource.addRange(fieldNum(DirPartyRelationship, ParentParty));
sysTableLookup.addLookupfield(fieldNum(DirPartyRelationship, RelationshipTypeId));
sysTableLookup.addLookupfield(fieldNum(DirPartyRelationship, ChildParty));
queryBuildRangeJournalType.value(queryValue(_ParentParty));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
content_copyCOPY
Comments