Skip to Content
Jun 29, 2016 at 08:56 AM

Identify create first time or update in BeforeSave



I have a solution where I have to call External Web Services from my BeforeSave event at root node. What I need to do is, there are two different web services which I need to call, one involves data from Common node and other from AddressInformation node, both from Customer object.

Now there are two scenarios, first is for create, other is for update. My problem is, when I am creating new customer, my BeforeSave event gets called multiple times.

My both calls, for creation and update are in BeforeSave method. Is there anyway by which I can understand, if it's object creation or update? I need that info inside BeforeSave event.