Firstly, we have no Biz API for Docman, so you would have to develop that yourself. And I don’t know enough about it to say how it could/should be done, considering that you need to handle large and possibly binary files.
I also know too little about SharePoint to suggest another solution.
I think the requirement needs a bit more explanation as well? What happens if they can “attach the SharePoint document”? What then? Should it still be in SharePoint? If yes, what if it is updated in SharePoint? Or Docman?
And what is the underlying goal with all this?
Thank you for the response Mathias.
If we say about the requirement, the requirement of the customer is to add an attachment to part rev lines. The approach I followed was, create a document revision and add that document as an attachment to the order line. Once we create the document revision, we need to pick the file from a location where customer is mentioned in the incoming XML (in here normally what we do is create an object property and access to the file path). But now customer stated that instead of taking those documents from a file path, he needs the application to fetch the document from share-point.
What happens if they can “attach the SharePoint document”? - It will be added to document revision.
What then? Should it still be in SharePoint? - Yes, needs to be in share-point
what if it is updated in SharePoint? Or Docman? - Pending for that information from the customer, but first they need to make sure whether this kind of activity is possible with IFS application.
Hope you got some idea.
Hi,
Thanks for the explanation.
How about, instead of keeping the file to the SharePoint document in Docman, you keep a link to it (just create and check in a .lnk file, that contains the correct URL, plus other metadata)? That is much easier and, to be frank, more "correct". This means the user will open the link, which will open in their default web browser.
/Mathias
Thanks for the idea @Mathias Dahl .
But do you know how we can achieve this?
In this post there is a suggestion to add a dummy file to a document revision and set up a macro for the “View” process. Is it the correct way? or are there any other ways?
If it is the correct way, how would you suggest to execute it (process or any example work)?
Thank you.
Hi,
The file could either be a dummy file, or it could be the actual link file itself (.lnk or .url extensions). It was a while since I experimented with this so I don't remember if we need a macro or not. You can try to attach a .lnk or .url file yourself in Docman and see what happens if you view it. Don't forget to add the necessary basic data under EDM Basic / File Types. A link file is easy to create, just drag and drop that little icon to the left of the browser address field to your desktop.
Let us know how it goes.
/Mathias
Thank you Mathias,
Solution worked. In APPS9 we don’t need to write any macro to view a .lnk or .url file since when we view the document, the link/url file will be executed automatically.
But we have to set the EDM Basic / File Types via an INS.
Hope this will be helpful to someone else.
Thank you Mathias,
Solution worked. In APPS9 we don’t need to write any macro to view a .lnk or .url file since when we view the document, the link/url file will be executed automatically.
But we have to set the EDM Basic / File Types via an INS.
Hope this will be helpful to someone else.
So are you saying that I first need to create a document file type of INS? When I go to create a new document, what do I put in as the file location?
Hi @Vernon Anderson ,
When you create a EDM Basic File Type you no need to set any file location. Please refer the sample code shown below.
DECLARE
file_type_ edm_application_tab.file_type%type;
file_extension_ edm_application_tab.file_extention%type;
description_ edm_application_tab.description%type;
check_exist_ VARCHAR2(6);
BEGIN
file_type_ := 'URLFILE';
file_extension_ := 'URL';
description_ := 'Unified Resource Locator';
check_exist_ := EDM_APPLICATION_API.Check_Valid_File_Extension_(file_extension_);
IF (check_exist_ = 'FALSE') THEN
EDM_APPLICATION_API.New(file_type_, file_extension_, description_);
END IF;
END;
*Additional:
If you mean about fetching files from a file path location, yes for that instance you have to create an oracle directory path via the Object Properties window. That also can be achievable via an INS.
DECLARE
directory_object_ VARCHAR2(100) := 'FILE_STORAGE_DIR';
file_path_ IFSAPP.OBJECT_PROPERTY_TAB.Property_Value%TYPE;
stmt_ VARCHAR2(5000);
BEGIN
file_path_ := OBJECT_PROPERTY_API.Get_Value(object_lu_ => 'ObjName',
object_key_ => 'OBJ_NAME',
property_name_ => 'A_PREFERRED_NAME');
IF(file_path_ IS NOT NULL) THEN
stmt_ := 'CREATE OR REPLACE DIRECTORY '|| directory_object_ || ' AS ' || ''''||file_path_||'''';
EXECUTE IMMEDIATE stmt_;
END IF;
END;
But in my .lnk/.url instance, we created a BLOB from the server side(.plsql) and created a .lnk/.url file from there.
PROCEDURE C_Generate_File_Data (
file_data_ OUT BLOB,
string_ IN VARCHAR2)
IS
BEGIN
dbms_lob.createtemporary(file_data_, FALSE);
dbms_lob.append(file_data_, utl_raw.cast_to_raw('/InternetShortcut]' || chr(10)));
dbms_lob.append(file_data_, utl_raw.cast_to_raw('URL=' || string_));
END C_Generate_File_Data;
File content as shown below.
Eg:
|InternetShortcut]
URL=https://google.com
Hope this will be helpful to you.
Hi @hasithdeshan,
I hate to bump an older thread but is it possible for you to share a bit more information about your latest reply?
I am working with a customer whom has a similar requirement, but we are in Cloud (22R1). They prefer to use SharePoint as many of their users whom need to access these files will not have IFS access. For those that do use IFS, they want the ability - or the option if they so choose to link to the SharePoint directory that is relevant to the IFS Object.
For example, on the Customer Order in IFS, they may have the Customer’s Purchase Order PDF in SharePoint and would like the ability to link these.
Thanks!