crmTech/ May 8, 2015/ Siebel/ 0 comments

Find below business service code snippet to fecth the file name from VBScript. This code supports only for Windows OS.

Function Service_PreInvokeMethod (MethodName As String, Inputs As PropertySet, Outputs As PropertySet) As Integer
If MethodName = "FileName" Then
Dim MyFile, MyPath, MyName As String
 MyPath = "c:\Test\" ' Set the path.
 MyName = Dir(MyPath)
 Do While MyName <> "" ' Start the loop.
 If (GetAttr(MyPath & MyName)) Then
 MyFile = MyName + "|" + MyFile 'Concatnating FileName with | seperator
 End If
 MyName = Dir() ' Get next entry.
 Loop
 End If
 Outputs.SetProperty "FileName",MyFile
 Service_PreInvokeMethod = CancelOperation
 End Function
Advertisements
Share this Post

About crmTech

Sharad is working from more than 11 years in IT industry. He has giving his technical services in CRM for telecom, automobile, retail, finance industry in Sales, Service and Marketing. He has primary skill in Siebel and Salesforce Marketing Cloud. Apart from this he has worked in Google Cloud, Wordpress blogging, SEO optimization, Short film making, mobile apps creation,logo design creation for his own interest.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.