Hello,
How to configure the display of content parameters associated with the user's division in the customer journey?
Thank you for your help.
Regards.
Fa
Hello,
How to configure the display of content parameters associated with the user's division in the customer journey?
Thank you for your help.
Regards.
Fa
Hi,
Thank you Clofy :)
I will get back to you as soon as I can test.
Regards.
Fa
Hi Fa,
Please let me know whether the solution could make sense for you. :)
Hey Fa
Please see response by Clofly and let us know if you have any other questions.
Thanks
Hi Fa,
Does "user's division" refer to business unit of the current user?
If so, it could be done with custom JavaScript function.
1. Open a content settings record to get its GUID.
2. In Customization page(Advanced Settings > Customizations), create a JScript web resource and add code below to its content.
With this sample code, if business unit name of the current user is equal to 'CloflyBU', then set the Content settings field of the customer journey to a specific one.
function setDefault(executionContext) { // Get current user ID var userSettings = Xrm.Utility.getGlobalContext().userSettings; var userid = userSettings.userId.replace(/[{()}]/g, ''); console.log(userid); // Retrieve business unit of the current user Xrm.WebApi.retrieveRecord("systemuser", userid, "?$select=_businessunitid_value").then( function success(result) { var businessUnitName = result["_businessunitid_value@OData.Community.Display.V1.FormattedValue"]; if (businessUnitName === 'cloflyBU') { var contentSettings1 = new Array(); contentSettings1[0] = new Object(); contentSettings1[0].id = '73c8f2d1-b43a-eb11-a813-000d3a80c481'; contentSettings1[0].name = 'My Content Settings'; contentSettings1[0].entityType = "msdyncrm_contentsettings"; var formContext = executionContext.getFormContext(); formContext.getAttribute("msdyncrm_contentsettingsid").setValue(contentSettings1); } }, function (error) { console.log(error.message); } ); }
3. Insert the web resource to Customer Journey > Information form, then enable our custom function at OnLoad event of the form.
Save and publish the form to check whether the code works.
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,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156