通过 SugarCRM WSDL 更新行
我有客户端运行版本的 PDF 文档(我相信是 3.1 Pro,但不是 100% 确定;这可能只是最初购买的版本),但我不太清楚如何更新记录。这是我到目前为止所知道的:
set_entry
似乎是最接近的匹配。我从 PDF 中看到以下关于此函数的描述正确:
“创建或更新 SugarBean”
我如何告诉它更新而不是插入记录?例如,我正在尝试将一个表的一列更新为一个特定值,我认为我已经尽可能接近以下内容:
$result = $sugar['soapclient']->call(
'set_entry',
array(
'session'=>$sugar['session'],
'module_name'=>'Kits',
array(
array("name" => 'location', "value" => 'New Cool Location')
),
'where'=>'id="1000ee55-55dc-feb0-c71a-4e5e8c31ad1b"'
)
);
澄清:我只想将“位置”列更新为“新酷位置”其中“id”是“1000ee55-55dc-feb0-c71a-4e5e8c31ad1b”。我还没有在实时环境中运行这段代码,因为我们缺乏功能齐全的开发环境,所以我想在运行之前对代码更有信心。
I have the documentation PDF for the version a client is running (I believe 3.1 Pro but am not 100% sure; that may just be the version initially purchased) but I cannot quite figure out how to UPDATE records. Here is what I know so far:
set_entry
seems to be the closest match. I see from the PDF that the following is true about this function:
"Creates or updates a SugarBean"
How do I tell it to update rather than insert a record? For example, I am trying to update one column of one table to one specific value and I think I am as close as I can get with the following:
$result = $sugar['soapclient']->call(
'set_entry',
array(
'session'=>$sugar['session'],
'module_name'=>'Kits',
array(
array("name" => 'location', "value" => 'New Cool Location')
),
'where'=>'id="1000ee55-55dc-feb0-c71a-4e5e8c31ad1b"'
)
);
Clarification: I want to update the column 'location' to 'New Cool Location' only where the 'id' is '1000ee55-55dc-feb0-c71a-4e5e8c31ad1b'. I have also not ran this code on the live environment yet because we lack a fully functional development environment, so I want to be more confident in the code before it is ran.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将代码示例更改如下:
Change the code example as following: