开发者

CRM 4 entity["name"] = "New value";

开发者 https://www.devze.com 2023-02-02 09:53 出处:网络
How do I update en entity for example:updateEntity[\"name\"] = \":\"... I don\'t understand how i should work with images (pre/post) and \"New Steps\" pre/post. Please give me some guidlines how I upd

How do I update en entity for example: updateEntity["name"] = ":"... I don't understand how i should work with images (pre/post) and "New Steps" pre/post. Please give me some guidlines how I update an enti开发者_开发技巧ty. Everyting seems to be fine exept the last step... how to update an entity with some value (string). thanks... Fred Whats wrong with the code below???

 // Obtain the target business entity from the input parmameters
                DynamicEntity entity = (DynamicEntity)context.PreEntityImages["PreServiceMobile"];// context.InputParameters.Properties["Target"];
                DynamicEntity updateEntity = (DynamicEntity)context.InputParameters.Properties["Target"];

                            updateEntity["name"] = "value";


You can only set values in the input entity during a pre stage plugin. In a post stage plugin, the entity has already been saved. If you need to update the entity in a post stage, you need to call CrmService.Update(entity)

0

精彩评论

暂无评论...
验证码 换一张
取 消