I have two different entities in CRM and have to find a difference between date present in one entity and date present in another entity.
I tried using calculated column but the field's schema name from another entity is not showing up in formula.
Can anyone help me out how to achieve this?
FYI
Entity 1: Rebate & Approvals, Field - Sales Delivery Committed Date
Entity 2: OFG Data, Field - NWC Invoice Date
Calculated Field: Diff b/w committed and Invoice date
Hi,
Please validate of javascript syntax is correct.
Please share screenshot of your event handler
I have used jScript to find number of days between two dates. But I am getting error as "Web resource method does not exist".
I have tried all the ways to fix. Can anyone help?
function datediff(){
var d1=crmForm.all.FirstDate.DataValue;
var d2=crmForm.all.SecondDate.DataValue;
var DayValue=1000*60*60*24;
alert(Math.ceil((d2.getTime()-d1.getTime())/DayValue));
var d1=Xrm.Page.getAttribute(“new_salesdeliverycommitteddate").getValue();
var i= Xrm.Page.getAttribute(“new_numberofdocumentsofnwc").getValue();
var d2=Xrm.Page.getAttribute(“new_nwcinvoicedate”+i).getValue();
var DayValue=1000*60*60*24;
var diff = Math.ceil((d2.getTime()-d1.getTime())/DayValue);
Xrm.Page.getAttribute(“new_diffbwcustomerdelivery_invoicedate").setValue(diff);
}
Hi,
You can use data from Lookup records within your Action. You first have to select the Lookup field and then type a period. After that, you can select one of the fields available on the related entity. For example, in the case of <LookupFieldName>.<RelatedFieldName>, you can select: ParentAccountId.AccountNumber.
Note that field level security will be ignored on the related entity, so if there is sensitive data in the accessed field we suggest securing your calculated field as well.
learn.microsoft.com/.../define-calculated-fields
This will only work when you have relationship defined between two entities.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156