Some clarifications requested
$(".description.above").css({"font-size": "22.5px",
"color": "#333"
});
<a style="font-size: 22px;color: #333;text-decoration:underline;" href="https://Google.com">Schedule of Procedures</a> and tick to confirm that you agree to only carry out procedures and treatment that are within your scope of practice
===================================================
https://org64806d53.crm8.dynamics.com/main.aspx?app=d365default&forceUCI=1&pagetype=dashboard&id=2701de60-8f2a-48a4-8262-4a35ca7441fa&type=system&_canOverride=true
uid= AshokD365@26Oct21.onmicrosoft.com
Pwd: naik!!11
===================================
brForCreate = service.RetrieveMultiple(new FetchExpression(fetchBR));
if (brForCreate != null && brForCreate.Entities.Count > 0)
{
_payload.TracingService.Trace("There is/are " + brForCreate.Entities.Count + " Required Attendee(s) on Appointment for which BRB has to be created.");
brUserIdforCreate = (Guid)brForCreate.Entities[0].Attributes[BookableResource.BRId];
}
===========================
using System;
using Microsoft.Xrm.Sdk;
namespace TechnicalAssessment
{
public class WSTechnicalAssessment : IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service = factory.CreateOrganizationService(context.UserId);
ITracingService trace = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
{
Entity entity = (Entity)context.InputParameters["Target"];
if (entity.LogicalName == "ws_orderline")
{
var price = (int)entity.Attributes["ws_price"];
var quantity = (int)entity.Attributes["ws_quantity"];
//var subtotal
entity.Attributes["ws_subtotal"] = price * quantity;
}
else if (entity.LogicalName == "ws_orderheader")
{
}
var accFrisrname = entity.Attributes["firstname"].ToString();
var accLastname = entity.Attributes["lastname"].ToString();
//test.Attributes.Add("firstname",entity.Attributes["firstname"].ToString());
//test.Attributes.Add("lastname", "lname");
//service.Create(test);
}
}
}
}
===========================
portal
validation on button click-
https://softchief.com/2021/07/21/add-custom-form-field-client-validation-for-advanced-forms-in-power-portal/
multiselect-
https://powerusers.microsoft.com/t5/Power-Apps-Portals/PowerApps-Portals-custom-HTML-or-javascript-field/td-p/549187
https://readyxrm.blog/2018/10/10/cookie-policy-acceptance-in-dynamics-365-portals/
function addSubgridEventListener() {
var gridContext = globalFormContext.getControl("ContactsContracts");
//ensure that the subgrid is ready…if not wait and call this function again
if (gridContext == null) {
setTimeout(function () { addSubgridEventListener(); }, 500);
return;
}
//bind the event listener when the subgrid is ready
gridContext.addOnLoad(getActiveProductHolding);
gridContext.addOnLoad(AutoSelectSolePolicy);
//getActiveProductHolding();
}
-------------------------------------------
https://technologyblog.rsmus.com/microsoft/dynamics-365-customer-engagement/changing-rollup-calculation-frequency-microsoft-dynamics-crm-2015/
refreshRoleupField: function (executionContext, entityName, entityId, rollup_fieldName)
{
debugger;
var formContext = executionContext.getFormContext();
var clientUrl = formContext.context.getClientUrl();
// Method Calling and defining parameter
var rollupAPIMethod = "/api/data/v9.1/CalculateRollupField(Target=@tid,FieldName=@fn)";
// Passing Parameter Values
rollupAPIMethod += "?@tid={'@odata.id':'" + entityName + "(" + entityId + ")'}&@fn='" + rollup_fieldName + "'";
var req = new XMLHttpRequest();
req.open("GET", clientUrl + rollupAPIMethod, false);
req.onreadystatechange = function ()
{
if (this.readyState === 4)
{
req.onreadystatechange = null;
if (this.status === 200)
{
console.log("Field Recalculated successfully");
}
}
};
req.send();
formContext.data.entity.save();
}
Syntax for calling the method
onLoad: function (executionContext)
{
var entityId = formContext.data.entity.getId().replace('{', '').replace('}', '');
opty.Functions.refreshRoleupField(executionContext, 'opportunities', entityId, 'new_totalunitcost');
opty.Functions.refreshRoleupField(executionContext, 'opportunities', entityId, 'new_sumextendedcost');
}
===============================
https://icons8.com/icon/98934/submit-document
https://icons8.com/icons/set/submit
https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-webapi/retrievemultiplerecords
https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/233699/read-all-record-from-subgrid---using-javascript
var gridControl = document.getElementById('subgrid_id').control;
var ids = gridControl.get_allRecordIds();
for (i = 0; i < ids.length; i++) {
var cellValue = gridControl.getCellValue('column_name', ids[i]);
// DO WHATEVER YOU WANT WITH THE CELL VALUE HERE!..
}