Aim:Need to update field using javascript using SOAP or REST.
Available Fields in Form : Total,Field1,Field2
Question: I have three fields in custom Entity Form Total,Field1,Field2. I need to update Total field with addition of Field1 & Field 2.If the javascript execute means need to update total field value for all records which is available in a Entity.
How to do this?Is possible to using FetchXml in javascript?
Xrmservicestoolkit has functionality that you can use to perform rest and soap queries.
once you have the library installed and referenced it's a matter of creating the fetchxml request, performing the math, then writing it to the "total" field.
the query will look something like this:
from that point you just have to add all the values and then write it to the proper field. Let me know if you have trouble.
keep in mind that by performing this using javascript will only update the latest record created, and not all of them.