OPTION 1:
public static Name storeOperatingUnitName(RecID _storeRecId)
{
RetailChannelTable retailChannelTable;
DirPartyTable dirPartyTable;
OMOperatingUnit operatingUnit;
;
select firstOnly recId from retailChannelTable
where retailChannelTable.RecId == _storeRecId
join recId from operatingUnit
where operatingUnit.RecId == retailChannelTable.OMOperatingUnitID
&& operatingUnit.OMOperatingUnitType == OMOperatingUnitType::RetailChannel
join name from dirPartyTable
where dirPartyTable.RecId == operatingUnit.RecId;
return dirPartyTable.Name;
}
OPTION 2:
public static Name storeOperatingUnitName(RecID _storeRecId)
{
RetailChannelTable retailChannelTable;
DirPartyTable dirPartyTable;
OMOperatingUnit operatingUnit;
;
select firstOnly RecId from retailChannelTable
join RecId from operatingUnit
join Name from dirPartyTable
where retailChannelTable.RecId == _storeRecId
&& operatingUnit.RecId == retailChannelTable.OMOperatingUnitID
&& operatingUnit.OMOperatingUnitType == OMOperatingUnitType::RetailChannel
&& dirPartyTable.RecId == operatingUnit.RecId;
return dirPartyTable.Name;
}
public static Name storeOperatingUnitName(RecID _storeRecId)
{
RetailChannelTable retailChannelTable;
DirPartyTable dirPartyTable;
OMOperatingUnit operatingUnit;
;
select firstOnly recId from retailChannelTable
where retailChannelTable.RecId == _storeRecId
join recId from operatingUnit
where operatingUnit.RecId == retailChannelTable.OMOperatingUnitID
&& operatingUnit.OMOperatingUnitType == OMOperatingUnitType::RetailChannel
join name from dirPartyTable
where dirPartyTable.RecId == operatingUnit.RecId;
return dirPartyTable.Name;
}
OPTION 2:
public static Name storeOperatingUnitName(RecID _storeRecId)
{
RetailChannelTable retailChannelTable;
DirPartyTable dirPartyTable;
OMOperatingUnit operatingUnit;
;
select firstOnly RecId from retailChannelTable
join RecId from operatingUnit
join Name from dirPartyTable
where retailChannelTable.RecId == _storeRecId
&& operatingUnit.RecId == retailChannelTable.OMOperatingUnitID
&& operatingUnit.OMOperatingUnitType == OMOperatingUnitType::RetailChannel
&& dirPartyTable.RecId == operatingUnit.RecId;
return dirPartyTable.Name;
}
Komentar
Posting Komentar