69

I am attempting to create a custom User Control that is usable in the Acumatica Framework. Documentation is very limited so I was hoping someone may have some experience/examples of how best to implement?

It appears possible by creating a WebControl derived from PXWebControl and creating a global JS function with a matching name.

Anth12
  • 1,869
  • 2
  • 20
  • 39
  • 4
    I can provide you an example of how to work with a pure HTML/JS control and have it interact with the graph, but as far creating an ASP.NET control that will seamlessly work with the Acumatica framework, it's not something I've seen before. I tried it a while ago but wasn't able to figure out how to have my global JS functions loaded - didn't try very hard however. Will be watching this question with great interest! – Gabriel Jun 11 '16 at 16:23
  • 9
    This question is too broad; [questions asking only for generic examples are off-topic for Stack Overflow](//meta.stackoverflow.com/a/291259/2747593). Instead, start writing code, and come back when you have a more specific problem. Be sure to show us [what you have tried](http://whathaveyoutried.com) and include a [Minimal, Complete, Verifiable Example](//stackoverflow.com/help/mcve). – Scott Weldon Jun 30 '16 at 17:52

1 Answers1

2

To create a custom User Control in an easy way, you need to:

  • Open Customization of your project (System - Customization - Customization Project)
  • On the left side, you can see your screens in your customization. Find screen that needs or add needed screen. Go to the necessary view.
  • Select add controls and add your needed control.

You can see in an image provided below.

enter image description here

Ess Kay
  • 598
  • 4
  • 20
Hayk
  • 46
  • 3
  • The product doesn't really support custom control (no option for that in Add Control tab). On the other hand JavaScript is correctly highlighted as the closest you can get to a custom control.. – Hugues Beauséjour Feb 05 '20 at 15:38
  • 1
    @HuguesBeauséjour technically any custom asp.net control can be used with Acumatica Framework. The other question is that the Layout Editor won't automatically show or manage that control with drag&drop. But the question is not specific to Layout Editor. – Samvel Petrosov Jan 05 '22 at 21:45
  • Correct, this is a possibility when creating new pages. – Hugues Beauséjour Jan 06 '22 at 13:56
  • I'm not sure you can customize existing pages with any asp.net control. The customization parser will likely break on unknown controls. – Hugues Beauséjour Jan 06 '22 at 14:02