x++ code to add hyperlink to a field in D365FO
Here is a way to provide hyperlink for field. 1.Create an Extension class to the form as below. [ExtensionOf(formStr(TestHistory))] public final class TestHistoryForm_Extension { } 2.Copy onPostRun form eventhandler and write code as below. [FormEventHandler(formStr(TestHistory), FormEventType::PostRun)] public static void TestHistory_OnPostRun(xFormRun sender, FormEventArgs e) { FormStringControl formCtrl = sender.design().controlName(formControlStr(TestHistory,TestHistory_Voucher)); formCtrl .registerOverrideMethod(methodStr(FormStringControl, jumpRef), methodStr(TestHistoryForm_Extension, JumpRefId), sender); } 3.write definition for JumpRefId method public void jumpRefId(FormControl _formControl) { MenuFunction menuFunction; ...
• Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updatingAzure Online Training India
ReplyDeletenice blog
ReplyDeleteMicrosoft Windows Azure Training | Online Course | Certification in chennai | Microsoft Windows Azure Training | Online Course | Certification in bangalore | Microsoft Windows Azure Training | Online Course | Certification in hyderabad | Microsoft Windows Azure Training | Online Course | Certification in pune