---
title: "CRMOD Integration Development Tips"
author: "huhu_long"
date: "2011-08-17T10:44:06Z"
tags: ["CRMOD"]
categories: ["行业应用"]
slug: "crmod-integration-development-tips"
draft: false
lastmod: "2011-08-17T10:44:06Z"
id: 1137840
url: "https://vrplat.iteye.com/blog/1137840"
---

1. 任何Record Type的Owner字段是可以被更新的； 但insert一条Record的时候， 如果不指定Owner字段， 那么Owner就是默认的Creator， 否则就是指定的User. 这里的User可以是CRMOD里面的任何User.

2. Stateless Web Service Request Header的格式是：

```xml

<soapenv:Header>
   <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <wsse:UsernameToken>
         <wsse:Username>myUsername</wsse:Username>
         <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
      </wsse:UsernameToken>
   </wsse:Security>
</soapenv:Header>

```


3. 无状态的Web Service Call就是指把Session交给Oracle Server端来维护， 客户端不用频繁的去login然后取到Session然后进行其他的操作。 CRMOD(当前为R19)会为每个用户维护的两个Session， 如果这两个Session没有过期(10分钟不活动视为过期)， 那么CRMOD就会自动为Client端的请求分配Session； 直到Session过期没有可用的Session的时候才会再次login获取Session并维护起来。

4. 查询的时候格式是： User.UserId = "='xxx-yyy'"， 如果要求查询不区分大小写则可以用"~'xxx-yyy'"

5. InsertOrUpdate对Parent和Child操作是注意， Child的Id一定要指定， 不管这个Id存不存在。
   如果ChildId在Parent的ChildList里面存在则是Update， 如果不存在则是Insert.

6. 在使用Stateless Web Service的时候要把Company Profile页面上的“R16 Compatibility Mode” 钩去掉. 原话是这样的：
to perform a stateless transaction, the Web Services R16 Compatibility Mode check box must be cleared in the Company Profile page and the Username and PasswordText tokens must be provided in the request.