SAP C4C的自開發UI可以放到Embedded Component裡去,如下圖所示,在Cloud Application Studio裡建立一個新的Embedded Component:
我在這個自開發頁面裡就放了一個input field:
如果想把包含了這個input field的Embedded Component放到Sales Lead的TI頁面去,UI designer裡切換到Extensibility explorer,選中想要把EC放置到的目标區域,點選按鈕:Add Embedded Component to Pane:
彈出對話框,在Embedded Component字段裡,選擇我們剛剛建立的EC:
Embedded Component必須提前建立好Inport,這個例子裡我建立的Inport取名fromLead, 有一個輸入參數ObjectID
左邊的Source區域,Outport選擇PublicOutportECLeadProduct,參數選擇SalesLeadID,點選Bind進行綁定。這樣TI頁面的Lead ID的值就能傳遞到Embedded Component裡了:
生成的change transaction如下:
<ChangeTransaction xmlns="http://www.sap.com/a1s/cd/oberon/uimodelchange-1.0" embeddingContext="" userType="Partner" user="K903ZOYBX3I" type="AddRemoveECToScreen" xrepPath="/YS5XJ942Y_MAIN/CHANGE_TRANSACTIONS/Partner/AddRemoveECToScreen/45d47fb08c09448f8e31d0df0871ff8d.uichange" id="9386162a9e6f4ac083855959e6441d38">
<UsedAnchor type="PaneContainerAnchor" xrepPath="/SAP_BYD_UI_FLEX/STABLE_ANCHORS/PaneContainerAnchor/UY3wFQ8MMqAhxwrWp2Co3G.uianchor">
<ReferencedAnchor type="OutPortAnchor" xrepPath="/SAP_BYD_UI_FLEX/STABLE_ANCHORS/OutPortAnchor/_9sw_Z26$4kqtD5LK_7isW.uianchor"/>
<AddECtoScreen title="Jerry Embedded Component test" textPoolId="7b909085b8bb4df1a3ba78467bbea288" InportName="fromLead" targetComponentID="/YS5XJ942Y_MAIN/SRC/ARCard/EC031801.EC.uicomponent">
<PassParameter inParamName="ObjectID" outParamName="SalesLeadID"/>
</AddECtoScreen>
</UsedAnchor>
</ChangeTransaction>
本文來自雲栖社群合作夥伴“汪子熙”,了解相關資訊可以關注微信公衆号"汪子熙"。