For instance, we would like to build a masking control. That would format a number based on the country the record is associated with. Furthermore we are adding the control to Dynamic CRM. Is there a way the we could load/access the form API (i.e. Xrm.Page.getAttribute("name").getValue()) vs making a call to the database?
Does that mean, at some point down the road the PCF might be a better fit for this?
@HemantG ,
I appreciate the options and It looks like there are ways to kind of do it. However at the moment, it is forcing a fit. Maybe down the road it will open up more.
Curently there is a restriction that the composite fields cannot be configured to the custom control so address-country is not available.
STEP1:
What you can do is create a placeholder address field for country and add a PBL to set the value of this fields base on the country in the address. Hide the field on the form so that the user does not sees two addresses.
OR
use the placeholder address - country field on the form and and add a sync workflow to write this value into actual address-country on form save.
STEP2:
Add additional input property to the Business phone field which is of type text and configure it to the placeholder address feild.
STEP3:
The additional property is now available in the business phone and control can access it to know what country is in the form.
HTH,
Hemant
@HemantGhopfully the below screenshot will provide some extra clearity. We want to put a PCF on the "Business Phone", so that it can be formated. However, based on the country. We want the format to change.
@Anonymous wrote:
It sounds like the PCF is not the right fit for a scenario like this.
Lets try one more time. Can you explain what is the end user expereince expected, possibly with some mock screens if that helps. We can then see whats the best fit.
It sounds like the PCF is not the right fit for a scenario like this.
Hemant, unless I am missing something. This will only load files that I have pre-defined. In this scenario, the Xrm API would not be available until run time, as it is full managed by the application itself.
WarrenBelz
85
Most Valuable Professional
Michael E. Gernaey
65
Super User 2025 Season 1
mmbr1606
55
Super User 2025 Season 1