• Nowshad
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 10
    Replies
Hi Team,

Please let me know the solution to share the note created on Mobile and internal users to the admin to create the report for all the users. As of now the user who created the note and shared it with another user can only view it. Please let me know any OOB or trigger logic to achieve this. Please share if you have a snippet of the code.

Thanks

Nowshad
We have installed FSL on iOS Mobile. Is is it possible to  include the  lightning component / VF page for FSL app on Mobile.
Problem:-  How to convert the AES-256 key and Initial vector with the public RSA Key (Shared by third party system Agreement Express)
Requirement:-
1. Randomly generate a AES-256 key.
2. Randomly generate an IV.
3. Encrypt the json with the AES key and IV, base64-encode it, and set it as the request
body.
4. Encrypt the AES key with the public RSA key and base64-encode it
5. Encrypt the IV with the public RSA key and base64-encode it
Implementation:
 From the above requirement, I am able to implement the point 1, 2, and 3. Now the technical challenge which we are facing here is, how to convert the AES-256 key and initial vector with the public RSA Key shared by third party system?
Approach one:-
I tried with below code and getting following error System.SecurityException: Invalid Crypto Key”
 Blob encryptedData = Crypto.sign(RSA, AEX-256 Key, AEXThirdPartyPublicKey );
 
Approach two:- Tried below, however client is getting  "java.lang.ArrayIndexOutOfBoundsException: too much data for RSA block"
 
https://gist.github.com/karmats/4270441be5a34fff7062

 
Please let me know if anybody would have came across above scenario. Client shared Public key in .Pem format not the private key.
Dear Members,
 We have immediate requirement to move the apps by drag and drop in VF page. Planning to implement by using JQuery. If anybody would have implemented similar functionality or any suggestion kindly email me @ snowshadali@gmail.com.

Page 1                                                                                    |                     Page 2
------------------------------------------------------------------------------------------------------------------------------------------
App1                App2              App3              App4

App5                App6              App7              App8

User by using mouse he will move the App8 to App6 position and all the app should be auto adjust.  Same for Page 2 ..Any suggestion or similar functionality if you would have implemented kindly let me know soon..

Thanks in advance..
Nowshad

Dear All,

 

 Need immediate help as I am facing one major show stopper, it would be really a great help if you can respond.

 

We have a pick list in custom object with 25 language  translated values in translation work bench.  So the requirement here is , I need to build the SOQL to get the translated values from the picklist for 25 language. I searched in google, by using the tolabel() I can query to get the translated value based on the user default language i will get the translated value.

 

However, we have a popup with 25 languages. So when the user selects any one of the 25  language from the dropdown list, I need to build the SOQL to get the translated value of the picklist from the translation workbench.

 

In below SOQL Metrics_Type__c is pick list and Language code (from below list i am passing the language code)which I am passing from the drop downlist from the popup. Kindly help to get the translated values.

------------- SOQL QUERY (Pseudo)  -START---------------

select id, Previous_FY_Actual_Q1_Days__c, Previous_FY_Actual_Q2_Days__c, Previous_FY_Actual_Q3_Days__c, Previous_FY_Actual_Q4_Days__c, Previous_FY_Actual_Total_Days__c, &lf;Current_FY_Planned_Q1_Days__c, Current_FY_Planned_Q2_Days__c, Current_FY_Planned_Q3_Days__c, Current_FY_Planned_Q4_Days__c, Current_FY_Planned_Total_Days__c, &lf;Current_FY_Actual_Q1_Days__c, Current_FY_Actual_Q2_Days__c, Current_FY_Actual_Q3_Days__c, Current_FY_Actual_Q4_Days__c, Current_FY_Actual_Total_Days__c,  (select Metrics_Type__c form translationworkbench where LanguageCode=’de’) , Current_FY_Achievement_Q1__c,Current_FY_Achievement_Q2__c,Current_FY_Achievement_Q3__c,Current_FY_Achievement_Q4__c,Current_FY_Achievement_Total__c,Current_FY_Actual_Q1_percent__c,Current_FY_Actual_Q2_percent__c,Current_FY_Actual_Q3_percent__c,Current_FY_Actual_Q4_percent__c,Current_FY_Actual_Total_percent__c,Current_FY_Planned_Q1_percent__c,Current_FY_Planned_Q2_percent__c,Current_FY_Planned_Q3_percent__c,Current_FY_Planned_Q4_percent__c,Current_FY_Planned_Total_percent__c,Previous_FY_Actual_Q1_percent__c,Previous_FY_Actual_Q2_percent__c,Previous_FY_Actual_Q3_percent__c,Previous_FY_Actual_Q4_percent__c,Previous_FY_Actual_Total_percent__c,Current_FY_Actual_Q1__c,Current_FY_Actual_Q2__c,Current_FY_Actual_Q3__c,Current_FY_Actual_Q4__c,Current_FY_Actual_Total__c,Current_FY_Planned_Q1__c,Current_FY_Planned_Q2__c,Current_FY_Planned_Q3__c,Current_FY_Planned_Q4__c,Current_FY_Planned_Total__c,Previous_FY_Actual_Q1__c,Previous_FY_Actual_Q2__c,Previous_FY_Actual_Q3__c,Previous_FY_Actual_Q4__c,Previous_FY_Actual_Total__c,YoY_gr_Comparision_Plan_Q1__c,YoY_gr_Comparision_Plan_Q2__c,YoY_gr_Comparision_Plan_Q3__c,YoY_gr_Comparision_Plan_Q4__c,YoY_gr_Comparision_Plan_Total__c,YoY_Actual_Growth_Q1__c,YoY_Actual_Growth_Q2__c,YoY_Actual_Growth_Q3__c,YoY_Actual_Growth_Q4__c,Total_YoY_Actual_Growth__c,Allocated_MDF_Amount_Q1__c,Allocated_MDF_Amount_Q2__c,Allocated_MDF_Amount_Q3__c,Allocated_MDF_Amount_Q4__c,Total_Allocated_MDFAmount__c,Previous_Year_MDF_Spent_Q1__c,Previous_Year_MDF_Spent_Q2__c,Previous_Year_MDF_Spent_Q3__c,Previous_Year_MDF_Spent_Q4__c,Previous_Year_MDF_Spent_Total__c,Total_MDF_Spent_Amount__c,Total_MDF_Utilization_Rate__c,MDF_Spent_Amount_Q1__c,MDF_Spent_Amount_Q2__c,MDF_Spent_Amount_Q3__c,MDF_Spent_Amount_Q4__c,MDF_Utilization_Rate_Q1__c,MDF_Utilization_Rate_Q2__c,MDF_Utilization_Rate_Q3__c,MDF_Utilization_Rate_Q4__c,GbuSpecializationPlan__r.Name,GbuSpecializationPlan__r.GBU_Specialization__c

FROM Metrics__c

WHERE GbuSpecializationPlan__c in (select id from GBU_Specialization_Plans__c where Joint_Business_Plan__c='xyz’)

order by GbuSpecializationPlan__r.Name asc,  Metrics__c.CreatedDate  asc ')

------------- SOQL QUERY To Be Used in Tibco -END---------------

 

English

en

Chinese (Simplified)

zh_CN

Japanese

ja

Korean

ko

Portuguese (Brazilian)

pt-BR

Russian

ru

Spanish (Latin America/Mexico)

es-MX

Bulgarian

bg

Chinese (Traditional)

zh_TW

Czech

cs

Danish

da

Dutch

nl

Finnish

fi

French

fr

German

de

Greek

el

Hungarian

hu

Italian

it

Norwegian (Bokmal)

no

Polish

pl

Romanian

ro

Spanish International

es

Swedish

sv

Thai

th

Turkish

tr

Vietnamese

vi

 

 

Dear All,

 

 I need to implementing the web service in SFDC(Integration application-via Tibco). I want to decide the approach and implemet. 1. Wsdl2Apex 2. plain servlet http request and response. I need the difference / pros and cons. Kindly let me know as soon as possible.

 

Thanks

Nowshad

Dear All,

 

 Can you please help me to check the String contains latic characters in Apex code. Please respond to me..if anybody have the code or solution.

 

Thanks

 

 

Dear All,

 

 We are facing an issue, while sending the security credentials to Tibco web service. We tried different ways, to send below details as part of SOAP header but we were not not able to succeed and this is a major show-stopper. Need to address this issue immediately to proceed further.

 

Soap Header:-  Below Soap header we need to send to Tibco as part of callout from SFDC

 

   <soapenv:Header>

     <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-

           open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="soap">

            <wsse:UsernameToken>

               <wsse:Username>tibadmin</wsse:Username>

               <wsse:Password Type="wsse:PasswordText">tibadmin</wsse:Password>

            </wsse:UsernameToken>

         </wsse:Security>

   </soapenv:Header>

 

Apex code:-

 

         xmlnsExampleCom1354865212525.MDCPLookUpSearch stub = new xmlnsExampleCom1354865212525.MDCPLookUpSearch();   
         stub.endpoint_x='https://g5t1173g.atlanta.hp.com/hpit/sfdc/dev/mdcp/lookupsearch';
         stub.timeout_x=60000;
         stub.clientCertName_x='SFDC_Certificate';
         stub.inputHttpHeaders_x = new Map<String, String>();
         String myData = 'tibadmin:tibadmin';
        //Blob hash = Crypto.generateDigest('SHA1',Blob.valueOf(myData));
        //  String encodedusernameandpassword = EncodingUtil.base64Encode(hash);
        String encodedusernameandpassword = EncodingUtil.base64Encode(Blob.valueOf(myData));
        stub.inputHttpHeaders_x.put('Authorization','Basic ' + encodedusernameandpassword );// 

 

Error message rendered in SFDC as below: The meaning of the  error code 181001 is we are not able to sent the Authentication details as part of SOAP header.

 

Web service callout failed: WebService returned a SOAP Fault: WS Security Error : 181001 faultcode=SOAP-ENV:Server faultactor=

 

Please let me know, did we miss anything here. Just for your info, we installed the certificate and configured the end point in SPA proxy server and we were able test the same in SOAP UI. The issue is in SFDC, how do we pass these credentials as part of the soap header.

 

Thanks

Nowshad

 

Problem:-  How to convert the AES-256 key and Initial vector with the public RSA Key (Shared by third party system Agreement Express)
Requirement:-
1. Randomly generate a AES-256 key.
2. Randomly generate an IV.
3. Encrypt the json with the AES key and IV, base64-encode it, and set it as the request
body.
4. Encrypt the AES key with the public RSA key and base64-encode it
5. Encrypt the IV with the public RSA key and base64-encode it
Implementation:
 From the above requirement, I am able to implement the point 1, 2, and 3. Now the technical challenge which we are facing here is, how to convert the AES-256 key and initial vector with the public RSA Key shared by third party system?
Approach one:-
I tried with below code and getting following error System.SecurityException: Invalid Crypto Key”
 Blob encryptedData = Crypto.sign(RSA, AEX-256 Key, AEXThirdPartyPublicKey );
 
Approach two:- Tried below, however client is getting  "java.lang.ArrayIndexOutOfBoundsException: too much data for RSA block"
 
https://gist.github.com/karmats/4270441be5a34fff7062

 
Please let me know if anybody would have came across above scenario. Client shared Public key in .Pem format not the private key.

Dear All,

 

 Can you please help me to check the String contains latic characters in Apex code. Please respond to me..if anybody have the code or solution.

 

Thanks

 

 

Dear All,

 

 We are facing an issue, while sending the security credentials to Tibco web service. We tried different ways, to send below details as part of SOAP header but we were not not able to succeed and this is a major show-stopper. Need to address this issue immediately to proceed further.

 

Soap Header:-  Below Soap header we need to send to Tibco as part of callout from SFDC

 

   <soapenv:Header>

     <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-

           open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="soap">

            <wsse:UsernameToken>

               <wsse:Username>tibadmin</wsse:Username>

               <wsse:Password Type="wsse:PasswordText">tibadmin</wsse:Password>

            </wsse:UsernameToken>

         </wsse:Security>

   </soapenv:Header>

 

Apex code:-

 

         xmlnsExampleCom1354865212525.MDCPLookUpSearch stub = new xmlnsExampleCom1354865212525.MDCPLookUpSearch();   
         stub.endpoint_x='https://g5t1173g.atlanta.hp.com/hpit/sfdc/dev/mdcp/lookupsearch';
         stub.timeout_x=60000;
         stub.clientCertName_x='SFDC_Certificate';
         stub.inputHttpHeaders_x = new Map<String, String>();
         String myData = 'tibadmin:tibadmin';
        //Blob hash = Crypto.generateDigest('SHA1',Blob.valueOf(myData));
        //  String encodedusernameandpassword = EncodingUtil.base64Encode(hash);
        String encodedusernameandpassword = EncodingUtil.base64Encode(Blob.valueOf(myData));
        stub.inputHttpHeaders_x.put('Authorization','Basic ' + encodedusernameandpassword );// 

 

Error message rendered in SFDC as below: The meaning of the  error code 181001 is we are not able to sent the Authentication details as part of SOAP header.

 

Web service callout failed: WebService returned a SOAP Fault: WS Security Error : 181001 faultcode=SOAP-ENV:Server faultactor=

 

Please let me know, did we miss anything here. Just for your info, we installed the certificate and configured the end point in SPA proxy server and we were able test the same in SOAP UI. The issue is in SFDC, how do we pass these credentials as part of the soap header.

 

Thanks

Nowshad

 

Hi all.

 

I am trying to connect from Apex to an external WebService that requires the use of ws-security. I have discovered that this is not directly supported by Apex, but a suggested solution was to manually edit the WDSL document to include the ws-security header information.

 

I have been trying to do this without much luck, and was wondering if anyone out there had a simple example of what I need to inject into the WSDL, and where?

 

My thanks in advance,

Ivar

  • December 21, 2010
  • Like
  • 0