“I can add these details while adding new deal, but i cant update these fields while updating deal !”
Are you sure about this? That wouldn’t make any sense from architectural standpoint.
last_activity_date and next_activity_date are based around Activity items so Activities would need to actually be created for you to be able to add last_activity_date and next_activity_date
This is why you need to use Activity endpoints if you are to change those fields (as they’re based off of the due times of Activities).
This is what I mean, these aren’t fields that you directly update. They are changed by the Due Date of Activities associated to the Deal.
This means you can’t simply add content or manually update these Fields, but if you added a new Activity to a Deal (with due date), it would then change next_activity_date.
So, amitb, it turns out that you actually can add those two fields in POST, so it made sense that you were trying to update them in PUT as well.
It doesn’t work because that’s not how you should think of those two fields: they should be automatically updated based on the Activities linked to it.
I honestly don’t know exactly why they can be specified like that while creating a deal, I’m looking into it right now.
To avoid any confusion, you now can’t add those fields while adding a deal. As mentioned before, they will be calculated automatically based on the activities linked to it