tomaszb
18th December 2013, 09:11
Hi all,
Is there a way to import the selected record in MMT satellite session (tdsls4101m000) from sales order line (tdsls4100m900) to customization?
Import works only for variables from main session tdsls4100m900, so I can not pass to the customization variables from the sales line.

NPRao
19th December 2013, 02:14
I saw a sample code in the latest Programmer's manual -

Below a part of the 4GL-UI script of the MMT header session is shown

table ttdsls205 |* Sales Order Templates
extern domain ttdyf.picture image.field |* image form field
extern domain tcguid image.guid |* GUID of image

before.program:
|Subscribe to PRCM messages from satellite to pass a new image GUID.
prcm.register("tdsls206:" & str$(pid) )

after.form.read:
|Image is linked to the lines table: tdsls206.
bind.image("image.field", "image.guid", "tdsls206")

choice.bms:
on.choice:
long node
if prcm.bms.is.notification() then
if prcm.get.subject() = "tssls206:" & str$(pid) then
|A new GUID is sent by the satellite
node = prcm.getdata()
image.guid=xmlData$(node)
display("image.field")
endif

In the satellite session the following code must be added to pass on the image GUID field to the header session.

table ttdsls206 |* Sales Order Template Lines
domain tcguid hold.guid |* GUID of image
long node

before.program:
node = xmlNewNode("guid") |XML node to communicate new GUID to header session

choice.mark.occur:
after.choice:
if is.mmt.satellite() and
hold.guid <> tdsls206.guid and
sel.num.selected() = 1 then
|Send a new GUID to the header session so the header session
|can update the picture field.
hold.guid = tdsls206.guid
node = xmlRewriteDataElement(node, "guid", tdsls206.guid)
prcm.notify("tdsls206:" & str$(parent), "", node)
endif

tomaszb
20th December 2013, 10:33
Thank you for your feedback. The session is a standard session MMT (tdsls4101m000) . I have no sources for the session, so I can not add anything :).
However, thank you very much for your guidance.

Best regards
Tomasz

bhushanchanda
20th December 2013, 11:48
Hi tomaszb,

Have you tried get.var() function?

Follow this link:-

Thread! (http://www.baanboard.com/baanboard/showthread.php?t=10032)

tomaszb
21st December 2013, 12:25
Yes I tried, but it seems that this function passes only the variables from the main session.