Open smartinsight-at opened 12 months ago
@smartinsight-at we need to implement Limit upsert operations. I'm thinking of this (preudo) syntax:
$client->update( $recordeng, LimitUpsert: NONE (default) | LimitUpsert: NOCREATE | LimitUpsert: NOUPDATE );
Hello George, I hope you are well, it has been a while since we have spoken. Thank you for your reply. That seems to make sense. I will try to work out how to add that to my request.RegardsAdamSent from my iPhoneOn 3 Oct 2023, at 8:01 am, George Doubinski @.***> wrote: @smartinsight-at we need to implement Limit upsert operations
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
If you get it done in a generic fashion, please submit a PR 😊
When I update specific fields for a record in Dynamics, if the record has since been removed (Deleted) from Dynamics, it creates blank record in its place rather than just failing as the id was not found.
What I want is a safe method of updating that will not create lots of new records when the client removes them from the CRM.
I am sure I am doing something wrong in my code, but I do not know what.
$middleware = new \AlexaCRM\WebAPI\OData\OnlineAuthMiddleware( $settings ); $odataClient = new \AlexaCRM\WebAPI\OData\Client( $settings, $middleware ); $client = new \AlexaCRM\WebAPI\Client( $odataClient );
This seems to relate to me pushing the id for a record that has now been removed, hence it creates the record.