You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 );
$recordeng = new \AlexaCRM\Xrm\Entity( 'contact', $row['externalid'] );
$recordeng['engagementscore'] = $row['score'];
try {
// run your code here
$externalresulteng=$client->update( $recordeng );
}
catch (exception $e) {
echo "<br>error Trapped: ".$e."<br>";
}
This seems to relate to me pushing the id for a record that has now been removed, hence it creates the record.
The text was updated successfully, but these errors were encountered:
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: ***@***.***>
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.
The text was updated successfully, but these errors were encountered: