一些我工作中经常使用的C4C ABSL代码片段
生活随笔
收集整理的這篇文章主要介紹了
一些我工作中经常使用的C4C ABSL代码片段
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
(1) 和query相關的
Query Related
import AP.Common.GDT; import AP.CRM.Global; var SalesOrderquery = SalesOrder.QueryByElements; var queryParameter = SalesOrderquery.CreateSelectionParams(); var queryResult; queryParameter.Add(SalesOrderquery.ID.Content,"I", "EQ","1686"); queryResult = SalesOrderquery.Execute(queryParameter); foreach( item in queryResult )item.ext_test_for_lock = "change by Service Order";(2) 如何定義集合 - collectionof的用法
import ABSL; import AP.Common.GDT var mycollection : collectionof SalesOrder.BuyerID; // internal table(3) elementof的用法,集合類型的基本操作
var mycollection: collectionof SalesOrder.BuyerID; var result: collectionof SalesOrder.BuyerID;var item_one: elementof SalresOrder.BuyerID; var item_two: elementof SalresOrder.BuyerID; var collection: collectionof SalesOrder.SystemAdministrativeData;item_one.content = "A"; mycollection.Add( item_one);item_one.content = "B"; mycollection.Add( item_one); mycollection.Count(); item_two = mycollection.getFirst(); item_two.Clear(); item_two = mycollection.getLast(); item_two.Clear(); collection.OrderBy( time=>time.LastChangeDateTime); result = mycollection.Where( test=>test.content == "A" );(4) BO retrieve的用法
var SalesOrderID : elementsof SalesOrder.ID; SalesOrderID.content = "12"; SalesOrder.Retrieve( SalesOrderID );<node Instance> = <BusinessObject>.Retrieve(<alternativeKey>); <Collection of node instances> = <BusinessObject>.Retrieve(<collection of alternativeKeys>);(5) ABSL里字符串的用法
import ABSL; var test; test = String.Substring("Test",2,2);(6) C4C后臺一些reuse service的用法
import ABSL; var time; time = Context.GetCurrentGlobalDateTime( );(7) 集合類型的查詢操作
var mySearchValues : elementsof myBO.Item; var collectionA; mySearchValues.ItemID.content = "Bill"; collectionA = this.Where(n => n.ItemID == mySearchValues.ItemID || !(n.ItemID.content < 1000 && n.ItemID.content == "Fred"));(8) DistinctBy操作
<Collection>.DistinctBy(<anonymous function>).ThenBy(<anonymous function>);The DistinctBy statement deletes duplicate lines in collections by comparing content of defined components.
An anonymous function (lambda expression) is used to refer to the components of the collection line type.
count操作:
= .Count();
(9) 如何用BODL(Business Object Definition Language)顯式定義BO的DU - deployment unit
[DeploymentUnit(CustomerRelationshipManagement)] businessobject BonusPlan {element ID : Identifier; }[DeploymentUnit(CustomerRelationshipManagement)] [Extension] businessobject BonusPlan {element ID : Identifier; }(10) 如何定義DO - Dependent objec
[DependentObject(TextCollection)] node ItemTextCollection;(11) BODL里一些常用的注解
總結
以上是生活随笔為你收集整理的一些我工作中经常使用的C4C ABSL代码片段的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Promolike Qualtrics
- 下一篇: 谷歌联合创始人布林卖掉特斯拉股票套现3.