SBX - Search With Button

SBX - Forum Post Title

Updating a field, when you cant use a workflow.

Microsoft Dynamics CRM Forum

Damesh Peri asked a question on 13 Jul 2018 11:14 AM

Question Status

Suggested Answer

Hi

On selecting Yes 'Remove from Board' (custom two option field) in the user record , I like to change a field in the resource (bookable) entity

Doesnt work with a workflow.

Any suggestion how this can be done? Java Script?

Reply
Andrew Butenko responded on 13 Jul 2018 2:20 PM
Suggested Answer

Hello,

You can use either JavaScript or plugin.

Reply
Temmy Raharjo responded on 14 Jul 2018 1:04 AM
My Badges
Suggested Answer

Hi Damesh,

You can trigger update from Javascript.

docs.microsoft.com/.../xrm-webapi

But I suggests you to create an plugin/workflow instead of updating entity using javascript. It's more make sense to do it after your entity itself save then update other entity.

Reply
Nagaraj M responded on 14 Jul 2018 2:39 AM
My Badges

The best way to achieve this is JavaScript.and if you are working on the v9.0 you can make use of OOB webapi call as well.

Reply
Sandeep Mishra responded on 15 Jul 2018 8:28 AM
My Badges
Suggested Answer

Hi,

If you are changing in diff entity you can use workflow or custom workflow if you are changing in web resource you can do using js.

Reply
Adrian Begovich responded on 15 Jul 2018 5:51 PM
My Badges
Suggested Answer

Hi Damesh Peri,

Create a Plugin that runs On Change of the "Remove from Board" field. The Plugin will need to check the value of the "Remove from Board" field to see if the value is Yes. If the value is Yes then run code to update a field in the resource (bookable) entity.

Reply
Aric Levin responded on 15 Jul 2018 9:56 PM
Suggested Answer

You can call a Web Api method to Update the record using JavaScript.

If you are using v9, you can use the OOB Xrm.WebApi functionality.

For previous versions, you can use CRM Rest Builder to generate the Api calls that you need.

You can download it by going to the following link:

github.com/.../CRMRESTBuilder

Hope this helps.

Reply
Andrew Butenko responded on 13 Jul 2018 2:20 PM
Suggested Answer

Hello,

You can use either JavaScript or plugin.

Reply
Temmy Raharjo responded on 14 Jul 2018 1:04 AM
My Badges
Suggested Answer

Hi Damesh,

You can trigger update from Javascript.

docs.microsoft.com/.../xrm-webapi

But I suggests you to create an plugin/workflow instead of updating entity using javascript. It's more make sense to do it after your entity itself save then update other entity.

Reply
Sandeep Mishra responded on 15 Jul 2018 8:28 AM
My Badges
Suggested Answer

Hi,

If you are changing in diff entity you can use workflow or custom workflow if you are changing in web resource you can do using js.

Reply
Adrian Begovich responded on 15 Jul 2018 5:51 PM
My Badges
Suggested Answer

Hi Damesh Peri,

Create a Plugin that runs On Change of the "Remove from Board" field. The Plugin will need to check the value of the "Remove from Board" field to see if the value is Yes. If the value is Yes then run code to update a field in the resource (bookable) entity.

Reply
Aric Levin responded on 15 Jul 2018 9:56 PM
Suggested Answer

You can call a Web Api method to Update the record using JavaScript.

If you are using v9, you can use the OOB Xrm.WebApi functionality.

For previous versions, you can use CRM Rest Builder to generate the Api calls that you need.

You can download it by going to the following link:

github.com/.../CRMRESTBuilder

Hope this helps.

Reply

SBX - Two Col Forum

SBX - Migrated JS