Mayank_Bhardwaj
asked on
Change the Status and save entity from the Form
I need to change the status of an entity and save it on click of a custom ribbon button.
If I change the status using the StatusRequest and response I first need to have the record saved. As soon as I do a Xrm.Pages.Data.entity.save the form reloads and I cannot call the state request response functions.
How does the standard CRM do it in on the mark complete ?
Any way this can be accomplised ?
If I change the status using the StatusRequest and response I first need to have the record saved. As soon as I do a Xrm.Pages.Data.entity.save
How does the standard CRM do it in on the mark complete ?
Any way this can be accomplised ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Mayank,
Of course I don't forget easy. :)
Now consider the second workaround I have mentioned. If you are not comfortable with that approach, you can always go with a Plugin.
Let me know if you see any challenges here.
Regards,
Chinmay.
Of course I don't forget easy. :)
Now consider the second workaround I have mentioned. If you are not comfortable with that approach, you can always go with a Plugin.
Let me know if you see any challenges here.
Regards,
Chinmay.
ASKER
This is Mayank, your trainees Yamaha :-). Well the problem with SetState message is that the record should already be saved, cos it needs a guid of the entity as a parameter.
What I am trying to accomplish here is as follows
I have this SMS Entity. I have created a Ribbon Button called Send. On a new SMS form the user fills up all the details and when the user clicks on the send button, the sms entity should be saved with the state = Scheduled and Status Reason as Scheduled too.