Manasa,
I figured out how to do this on Epicor 9.05.606....
Note that I wanted to added attachments that are related to the table "DMRHead", so my code reflects that.
1. Created a new Updateable dashboard with the tables XFileAttch and XFileRef and added the criteria xfileattch.relatedtofile = "DMRHead".
2. In the update processing tab I unchecked the Advanced BPM update only and chose the Business object XFileRef
3. IN the Update General Properties I chose these fields to update:
a. XFileRef.XFileDesc
b. XFileRef.XFileName
c. XFileRef.ShortChar01
4. I click on the regenerate BPM directive
5. I clicked on the button Advanced BPM Processing
6. On the Update- Preprocessing Tab I added this code: (To validate the data).
for each ttresults no-lock where
ttresults.RowMod = "A" and
ttresults.XFileRef_ShortChar01 = "":
{lib\PublishEx.i &ExMsg = "'Please enter a DMR number'"}
end.
for each ttresults no-lock where
ttresults.RowMod = "A" and
ttresults.XFileRef_ShortChar01 <> "":
find first dmrhead where
dmrhead.Company = cur-comp and
dmrhead.OpenDMR = true and
string(dmrhead.DMRNum) = ttresults.XFileRef_ShortChar01 exclusive-lock no-error.
if not avail dmrhead then do:
{lib\PublishEx.i &ExMsg = "'Please enter a valid DMR number'"}
end.
end.
7. In the Update Base Processing tab I added a new BPM with this code:
for each ttResults no-lock where
ttresults.XFileRef_ShortChar01 <> "":
find first udcodes where
udcodes.CodeTypeID = "DMRAttach" exclusive-lock no-error.
if avail udcodes then do:
assign udcodes.Number01 = ttresults.XFileRef_XFileRefNum.
assign udcodes.ShortChar01 = ttresults.XFileRef_ShortChar01
ttresults.XFileRef_ShortChar01 = "".
end.
end.
8. In the usercodes I added a new user code, typeID = "DMRAttch" and a new code, with codeid "DMRAttach".
9. I added a new data directive to the udcodes table with the condition that Number01 has been changed from any to any and with this code:
define variable j as integer no-undo.
for last ttudcodes no-lock:
for each xfileattch where
xfileattch.Company = cur-comp and
xfileattch.RelatedToFile = "DMRHead" and
xfileattch.Key1 = ttudcodes.ShortChar01.
if avail xfileattch then do:
assign j = j + 1.
end.
end.
assign j = j + 1.
insert into xFileAttch(Company, RelatedTofile, Key1, XFileRefNum, attachnum)
Values("PACJAY", "DMRHead", ttudcodes.ShortChar01 , ttudcodes.Number01 , j).
assign ttudcodes.Number01 = 0.
for each xfileref where
xfileref.ShortChar01 <> "".
if avail xfileref then do:
assign xfileref.ShortChar01 = "".
end.
end.
end.
10. Then I added the BAQ to a dashboard where I update the DMRhead table already.... Worked no problem. But like every other dashboard, you can add records not delete them. Am sure I can add some more code to delete the records... but I'll do that at a future date.
Marco Vissuet
Systems Engineer
Pacific Contours Corporation
Cell (619)507-2311
Anaheim Office (714) 693-1260
San Diego Office (619)670-3900
Fax (714) 693-1252
mvissuet@...<mailto:marcov@...>
http://www.pacificcontours.com/
"The information contained herein may be subject to the International Traffic in Arms Regulations (ITAR) Warning: - This document contains data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq.) as amended, or the Export Administration Act (Title 50, U.S.C., App 2401 et seq.) as amended. Violations of these export laws are subject to severe criminal and civil penalties. Disseminate in accordance with provisions of DoD Directive 5230.25.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Manasa Reddy
Sent: Wednesday, July 24, 2013 4:47 AM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Attachments on Dashboards
Marco,
I have been trying to figure this out myself and so far I have no solution. My point is if you do figure it out, please post to the group.
Or even hopefully someone else has figured it out!
Manasa
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Marco Vissuet
Sent: Tuesday, July 23, 2013 6:23 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Attachments on Dashboards
On DMR Processing its already there... my question is how do you add it to a dashboard?
Marco Vissuet
Systems Engineer
Pacific Contours Corporation
Cell (619)507-2311
Anaheim Office (714) 693-1260
San Diego Office (619)670-3900
Fax (714) 693-1252
mvissuet@...<mailto:mvissuet%40pacificcontours.com><mailto:mvissuet%40pacificcontours.com>
http://www.pacificcontours.com/
"The information contained herein may be subject to the International Traffic in Arms Regulations (ITAR) Warning: - This document contains data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq.) as amended, or the Export Administration Act (Title 50, U.S.C., App 2401 et seq.) as amended. Violations of these export laws are subject to severe criminal and civil penalties. Disseminate in accordance with provisions of DoD Directive 5230.25.
-----Original Message-----
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of Anthony Gercar
Sent: Tuesday, July 23, 2013 4:19 PM
To: <vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>>
Subject: Re: [Vantage] Attachments on Dashboards
How do you set up the attachment option?
Sent from my iPhone
I figured out how to do this on Epicor 9.05.606....
Note that I wanted to added attachments that are related to the table "DMRHead", so my code reflects that.
1. Created a new Updateable dashboard with the tables XFileAttch and XFileRef and added the criteria xfileattch.relatedtofile = "DMRHead".
2. In the update processing tab I unchecked the Advanced BPM update only and chose the Business object XFileRef
3. IN the Update General Properties I chose these fields to update:
a. XFileRef.XFileDesc
b. XFileRef.XFileName
c. XFileRef.ShortChar01
4. I click on the regenerate BPM directive
5. I clicked on the button Advanced BPM Processing
6. On the Update- Preprocessing Tab I added this code: (To validate the data).
for each ttresults no-lock where
ttresults.RowMod = "A" and
ttresults.XFileRef_ShortChar01 = "":
{lib\PublishEx.i &ExMsg = "'Please enter a DMR number'"}
end.
for each ttresults no-lock where
ttresults.RowMod = "A" and
ttresults.XFileRef_ShortChar01 <> "":
find first dmrhead where
dmrhead.Company = cur-comp and
dmrhead.OpenDMR = true and
string(dmrhead.DMRNum) = ttresults.XFileRef_ShortChar01 exclusive-lock no-error.
if not avail dmrhead then do:
{lib\PublishEx.i &ExMsg = "'Please enter a valid DMR number'"}
end.
end.
7. In the Update Base Processing tab I added a new BPM with this code:
for each ttResults no-lock where
ttresults.XFileRef_ShortChar01 <> "":
find first udcodes where
udcodes.CodeTypeID = "DMRAttach" exclusive-lock no-error.
if avail udcodes then do:
assign udcodes.Number01 = ttresults.XFileRef_XFileRefNum.
assign udcodes.ShortChar01 = ttresults.XFileRef_ShortChar01
ttresults.XFileRef_ShortChar01 = "".
end.
end.
8. In the usercodes I added a new user code, typeID = "DMRAttch" and a new code, with codeid "DMRAttach".
9. I added a new data directive to the udcodes table with the condition that Number01 has been changed from any to any and with this code:
define variable j as integer no-undo.
for last ttudcodes no-lock:
for each xfileattch where
xfileattch.Company = cur-comp and
xfileattch.RelatedToFile = "DMRHead" and
xfileattch.Key1 = ttudcodes.ShortChar01.
if avail xfileattch then do:
assign j = j + 1.
end.
end.
assign j = j + 1.
insert into xFileAttch(Company, RelatedTofile, Key1, XFileRefNum, attachnum)
Values("PACJAY", "DMRHead", ttudcodes.ShortChar01 , ttudcodes.Number01 , j).
assign ttudcodes.Number01 = 0.
for each xfileref where
xfileref.ShortChar01 <> "".
if avail xfileref then do:
assign xfileref.ShortChar01 = "".
end.
end.
end.
10. Then I added the BAQ to a dashboard where I update the DMRhead table already.... Worked no problem. But like every other dashboard, you can add records not delete them. Am sure I can add some more code to delete the records... but I'll do that at a future date.
Marco Vissuet
Systems Engineer
Pacific Contours Corporation
Cell (619)507-2311
Anaheim Office (714) 693-1260
San Diego Office (619)670-3900
Fax (714) 693-1252
mvissuet@...<mailto:marcov@...>
http://www.pacificcontours.com/
"The information contained herein may be subject to the International Traffic in Arms Regulations (ITAR) Warning: - This document contains data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq.) as amended, or the Export Administration Act (Title 50, U.S.C., App 2401 et seq.) as amended. Violations of these export laws are subject to severe criminal and civil penalties. Disseminate in accordance with provisions of DoD Directive 5230.25.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Manasa Reddy
Sent: Wednesday, July 24, 2013 4:47 AM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Attachments on Dashboards
Marco,
I have been trying to figure this out myself and so far I have no solution. My point is if you do figure it out, please post to the group.
Or even hopefully someone else has figured it out!
Manasa
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Marco Vissuet
Sent: Tuesday, July 23, 2013 6:23 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Attachments on Dashboards
On DMR Processing its already there... my question is how do you add it to a dashboard?
Marco Vissuet
Systems Engineer
Pacific Contours Corporation
Cell (619)507-2311
Anaheim Office (714) 693-1260
San Diego Office (619)670-3900
Fax (714) 693-1252
mvissuet@...<mailto:mvissuet%40pacificcontours.com><mailto:mvissuet%40pacificcontours.com>
http://www.pacificcontours.com/
"The information contained herein may be subject to the International Traffic in Arms Regulations (ITAR) Warning: - This document contains data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq.) as amended, or the Export Administration Act (Title 50, U.S.C., App 2401 et seq.) as amended. Violations of these export laws are subject to severe criminal and civil penalties. Disseminate in accordance with provisions of DoD Directive 5230.25.
-----Original Message-----
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of Anthony Gercar
Sent: Tuesday, July 23, 2013 4:19 PM
To: <vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>>
Subject: Re: [Vantage] Attachments on Dashboards
How do you set up the attachment option?
Sent from my iPhone
On Jul 23, 2013, at 7:11 PM, "supertico05" <mvissuet@...<mailto:mvissuet%40pacificcontours.com><mailto:mvissuet%40pacificcontours.com><mailto:mvissuet@...<mailto:mvissuet%40pacificcontours.com><mailto:mvissuet%40pacificcontours.com>>> wrote:
We usually attach files to DMRs...
We are trying to build a dashboard for managing DMRs, but cant figure out how to attach files to the dashboard... is it possible on Epicor 9.05.606?
[Non-text portions of this message have been removed]
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.<http://groups.yahoo.com/group/vantage/files/><http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]