Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Modularity and managed forms.

Forum

Search UsersRules
Modularity and managed forms.
#1
Active user
Points:: 0
Joined:: Feb 28, 2012

I have a tabular section which is common in many documents.
For example lets say my tabular section fields are ItemRef(Catalog reference) and price (Number)

Lets say that on the Document Form I need to handle the event of changing the ItemRef as follows:

when the ItemRef changes i need to call the server, get the last price from an information register and populate the price field

My problem is that i dont want to write the same code on the document form of all the documents. Is it possible to put this code inside a common module and how?

What is the best practice for creating this sort of mudularity on managed forms development?

Profile
#2
Just came
Points:: 10
Joined:: Apr 17, 2012

Hi,
You may cre ate   procedure or function with reserved word "Export" in "Common Module" and call it when you need.

Profile
#3
Just came
Points:: 10
Joined:: Apr 17, 2012

For example:

Code
Function GetPrice(Ref) Export

   Price = 100;
   
   Return Price;

EndFunction

In properties of module you must set "Server" and "Server call"

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.