Showing posts with label Attachment In Siebel. Show all posts
Showing posts with label Attachment In Siebel. Show all posts

Friday 1 April 2022

Working with Attachments in Siebel - Part2 Putting Size Restriction

 Hello All, 

In this post let us try to put size restriction while adding new Attachments.

The Logic is pretty simple, 

1. Identify the Target Attachment BC

2. Identify the File Size Field

3. Write Script on PreWriteRecord of Business Component

In any attachment applet, we can see the Fields Name, Size (in Bytes) ,Type etc.


 



Lets Try to write a Piece of Code to fetch the Size:

function BusComp_PreWriteRecord ()

{

    this.ActivateField("FileSize");

    var size= this.GetFieldValue("FileSize"); //Field that has size

    var sizeMB = size/1000000 ; //converting Bytes to MB

if (ToNumber(sizeMB) >= 5 ) //checking the size to less then 5 MB

{

TheApplication().RaiseErrorText("Please add file less then 5 MB");                     

}

}


Error Popup on Save Record:









very simple effective solution to Keep Siebel File System under control :-) ,any suggestions are always welcome.


Previous Post                        Next Post

Friday 17 April 2020

Working With Attachments in Siebel IO's

Hello All,

Recently I had a requirement wherein, i was required to share the attachment with Order over WebService.

This seems a bit tricky, but siebel has made it Possible via the IO based structure. We have to use IO that has the attachment IC and when we retrieve the Hierarchy of the IO, we can see the output of attachment IC and it is in MIME format encode with BASE64 encoding.

Now the target system has to read the file buffer and decode using any online Decoder or write a custom decoder.

Sample Structure looks like ,

More details can be found in bookshelf link , https://docs.oracle.com/cd/E14004_01/books/EAI2/EAI2_FileAttach.html

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...