• Imran Mohammed
  • SMARTIE
  • 1897 Points
  • Member since 2010

  • Chatter
    Feed
  • 68
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 720
    Replies

Hi,

 

Is it possible to make the standard field Name of a custom object invisible?
Field Name can not be removed from a page layout. Is there a way to make it invisible?

 

Best regards,

Altran 

Hi,

 

How can we change the label of the standard field Name of a custom object?

 

Best regards,

Altran

Hi All,

 

I'm doing a project with SFDC api, to upload object values. See some objects have fields as xx__cSpecified, which is a bool type.

 

If there si  a field a__c, there should be a new field a__cSpecified

 

b__c, b__cSpecified

c__c, c__cSpecified.

 

if I upload a field value to SFDC, I ned to write

 

obj.a__c = "xx";

 

Should I set value for a__cSpecified? such as below code:

obj.a__cSpecified = true;

 

Thanks

Kunlun

  • December 20, 2012
  • Like
  • 0

I'm running into this error: Invalid integer: common.apex.runtime.impl.ScalarList@b5144800 when executing the following code.  The code compiles with no problem.  I'm fairly certain I have my data types correct - not really sure what's causing this? Any ideas? 

 

   public Map<Target_HCP__c, Integer> targetsWithCalls = new Map<target_HCP__c, Integer>();
        
    public void updateCalls(){
            Map<Id, Integer> acctCalls = new Map<Id, Integer>();
            List<AggregateResult> r = [SELECT Account_vod__c acctid, COUNT(id) totalCalls
                           FROM Call2_vod__c 
                           WHERE Call_Date_vod__c =THIS_QUARTER
                           AND Status_vod__c = 'Submitted_vod'                            
                           GROUP BY Account_vod__c];
            for(AggregateResult i : r){
                acctCalls.put(String.valueOf(i.get('acctId')), integer.valueOf(i.get('totalCalls')));
                system.debug(' account>>> ' + i.get('acctid') + 'number of calls>>> '+i.get('totalCalls'));
            }  
           
   
         
         for(Target_HCP__c t : [SELECT id, Calls_Actual__c, Prescriber__c 
                                     FROM Target_HCP__c 
                                     WHERE Prescriber__c = :acctCalls.KeySet()]){
             targetsWithCalls.put(t, integer.valueOf(acctCalls.Values()));
             t.Calls_Actual__c += integer.valueOf(targetsWithCalls.Values());
             targetsToUpdate.add(t);
         }
            update targetsToUpdate;                     
         }

 

 

Hi

Afetr login into salesforce instance how will get visualforce page as a home page?can anybody will help me?

 

Thanks&Regards

I created a new project referring the Tutorial2 on the website. But I cannot see any folder named "unpackaged" as is given in the tutorial. So on creating tabs i do not see any tabs folder too. I can only view the tabs and other stuff on the broqwser but not on IDE. What could be the issue?

HI,

I need ur help !!

I am getting error INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id:[] Trigger.ShareOperatingUnits:  when test code covereag.

 

Test class ::

private class TestNewWorkOrder {

    static testMethod void myUnitTest() {
        User usr1 = [select id, Name, ProfileId  from User where Profile.Name = 'System Administrator' limit 1 ];
        System.runAs(usr1) {  
        Object__c ou = new Object__c();
        ou.Branch_Manager__c = UserInfo.getUserId();
        ou.Name = 'Test';
        insert ou;
     }

}

 

After insert Trigger::

trigger ShareOperatingUnits on Object__c (after insert, after update) {
    List<Object__Share> ouShareList = new List<Object__Share>();

    for(Object__c ou: Trigger.New) {
        Object__Share ouShare = new Object__Share();
        ouShare.ParentId  = ou.Id;
        ouShare.UserOrGroupId = ou.Branch_Manager__c;
        ouShare.AccessLevel = 'Read';
        ouShareList.add(ouShare);
        allOUids.add(ou.id);
    }

   insert ouShareList;   // HERE I M GETTING ERROR

}

 

Please tell me what i done wrong .

I think i need to make some changes on object side my trigger is working fine but getting prblm for test coverage .

Please help me !!

 

Many Thnks In Advance

 

Piyush

I am trying to clone attachments from opportunities to a custom object.

Once I create the custom object from the opportunity page I would like to have all the attachments from the opportunity cloned in the new related record.

 

Any idea or sample code for this?

 Thank you!!!

Hi,

 

Consider a scenario, Account has a Country field.

Depending on the value in Country field, values will be populated to Account Region (Custom Picklist Field).

Picklist Values - NAM, SAM, EMEA & APAC.

The values must be set dynamically, so is there any app or webservice for doing the same.

Any help is Appreciated.

 

 

Hi,

 

Is it possible to have a address datatye in a custom field in contact object?

 

Thanks

Prady

  • March 17, 2011
  • Like
  • 0

what is the difference between "before update" and "after update"?

  • December 21, 2010
  • Like
  • 0

Hi

 

I want to pass trigger.new to an APEX method that will perform some job but I keep getting an error:

Method does not exist or incorrect signature: MatchCandidate.findMatch(LIST<Candidate__c>)

 

my trigger code is:

 

trigger FindMatching on Candidate__c (after insert,after update) {
    
    MatchCandidate.findMatch(trigger.new);
}

 

 

My APEX code is:

 

Public with sharing class MatchCandidate {


 public void findMatch(List<Candidate__c> candidates){

 ///My code here

 }

 

}

 

Can anyone help my figure out what's wrong?

 

Thanks

 

 

Hi,

I want to display a list of records processed out of a batch process on a Visuaforce page for user operation.

The Batch process returns a list of records but the list is not passed to the VF controller. The list shows empty when debugged in the Vf controller. I do  realise that the batch process runs asynchronously, but the requirement is really critical.

 

Please reply as soon as possible. Any pointers will be highly appreciated. Thanks in advance.

 

Regards,

Dev1234.

Hi All,

 

how can i display all my Notes & Attachments as an image inside the visualforce page..

Hi,

 

Please help.  I want to display a Quote Contact Name in plain text in VF page but it is displaying as a link instead.

Here's my code which is displaying as a link.

 

<apex:outputfield value="{!Quote.ContactId}"/>

 

Thanks and Regards,

Del

HI every one,

 

    When user clicks on new button in custom objects data, I need to redirect the user to a web tab(created from external website url). 

 

   Can any one please let me know how to achieve this requirement.

 

Thanks,

Naresh

Hello Everyone,

Im facing problem with date.

i want to send records to batch apex filtered by createddate, but facing error as  "no viable Character".

as its from Class or Trigger, i can filter it by putting IF condition's in batch but that will be a long way.

so, Is there a way to do this: To filter the records in Query itself which we are sending to batch (String format)

 

Thanks & Regards

Rahul

Hi,

 

How can I display opportunity field value in VF page rendered as pdf. It only displays blank value..

Please help. Many Thanks in advance..

 

<apex:page showHeader="False" standardController="Opportunity"  sidebar="false" renderAs="pdf" >

    <apex:form >
          <apex:outputText value="{!Opportunity.Street_1__c}"/>
      </apex:form>

</apex:page>

I created a managed package in developer account. I installed it in another account(Testing account) successfully. 

 

Now I made some modifications to my package and uploaded to the appexchange. How to upgrade my package in testing account with out uninstalling it.

 

Please help me.

 

Thanks,

Naresh.B

I am new to apex programming first. we are having standard objects like accounts,contacts,opportunities....

& we can create custom objects with the extension of "__c". I observed in the programming the sObject but i am not understanding clearly about sObject concept. Anyone can please help me at this part.

                                              Thanks, in Advance...

Hi,

 

Can we update comments when an Approval Request is reassigned to another user using Apex?

I am able to update the Actor Id on ProcessInstanceWorkItem, but could find no way to update the Comments field of the ProcessInstanceStep using Apex.

 

If standard Reassign functionailty is used, the comments can be updated and could be seen in Approval History.

 

Any help or pointers will be highly appreciated.

I am getting Insufficient privileges issue when visualforce page is accessed on a tab.

Actually, the Visualforce page overrides the standard tab of custom object.

 

I have checked all the custom object permissions on the profile and made sure that Visualforce page and Apex classes are enabled for the profile.

The strange thing is that, when i turn on the View Setup and Configuration permission in the profile, the Visualforce page gets rendered well without any issue.

But i don't want that permission to be turned on.

 

If i turn off, i get the same issue.

 

Any thoughts?

Appreciate any help on this.

Hi,

 

I am getting the following exception when a webservice callout is made.

System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed

Until few weeks ago the webservice callout worked fine.

And there has been no code change from that point.

 

Can anyone let me know what could be the exact cause why this error is encountered?

Thanks in advance.

The Admin can login to another users account using a proxy.

Is there a way using Apex or any other Salesforce feature to find whether the logged in User is proxy or not?

Hi,

 

I am trying to reference one of managed apex class in new VF page as

<apex:page controller="Namespace.ABC" tabStyle="XXX">

//other stuff here

</apex:page>

 

My class is defined as 

public with sharing class ABC

{

  //code

}

 

I even checked that the version settings include the Package which this Managed class belongs to.

Any help on this will be highly appreciated.

Hi,

 

I have seen a strange behavior using visualforce email template.

Earlier, i used apex:outputField in vf email template and it worked perfectly.

Now, when i tried to modify email emplate, below error message is shown

Error occurred trying to load the template for preview: Read access not found for <<Custom Object>>.

 

Does anyone know why is this happening?

 

Hi,

Earlier, i created a visualforce email template which used apex:outputField to bind to custom object fields.

I did a Managed release and the email template worked fine.

Now when i tried to modify the email template, getting below error message

Error occurred trying to load the template for preview. Read access not found for Custom Object for <<custom object>>.

When apex:outputText is used, it works fine.

Does anyone know why apex:outputField is not working?

Is it due to Winter'11 changes done by salesforce?

Hi,

 

My webservice expects the security header to have username, password, password type and timestamp.

I am stuck with an issue and would like some assistance.

 

My Webservice code is

    public static void setupSecurity(Object service) {

        org.apache.cxf.endpoint.Client client = org.apache.cxf.frontend.ClientProxy.getClient(service);

        org.apache.cxf.endpoint.Endpoint cxfEndpoint = client.getEndpoint();

        Map<String, Object> outProps= new HashMap<String, Object>();

        outProps.put(WSHandlerConstants.ACTION,

                WSHandlerConstants.USERNAME_TOKEN + ' ' + WSHandlerConstants.TIMESTAMP);

        outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);

        outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS, ClientPasswordHandler.class.getName());

        outProps.put(WSHandlerConstants.USER, "Admin");

        PhaseInterceptor<SoapMessage> wssOut = new WSS4JOutInterceptor(outProps);

        cxfEndpoint.getOutInterceptors().add(wssOut);

        cxfEndpoint.getOutInterceptors().add(new SAAJOutInterceptor());

    }

 

As PasswordType also has to be sent as part of SOAP header i updated the WSDL.

Below is partial WSDL

 <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" >
     <xsd:element name="Security" type="s3:SecurityHeaderType"/>
       <xsd:complexType name="SecurityHeaderType">
        <xsd:sequence>
          <xsd:element minOccurs="1" maxOccurs="1" name="UsernameToken" type="s3:UsernameToken"/>
          <xsd:element minOccurs="1" maxOccurs="1" name="TimeStamp" type="s3:TimeStamp"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="UsernameToken">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="1" name="Username" type="xsd:string"/>
          <xsd:element  minOccurs="1" maxOccurs="1" name="Password">
           <xsd:complexType>
             <xsd:simpleContent>
                 <xsd:extension base="xsd:string">
                       <xsd:attribute name="Type" type="xsd:string"/>
                     </xsd:extension>
              </xsd:simpleContent>
          </xsd:complexType>
           </xsd:element>         
         </xsd:sequence>
      </xsd:complexType>
    
      <xsd:complexType name="TimeStamp">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="1" name="Created" type="xsd:dateTime"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="Expires" type="xsd:dateTime"/>
        </xsd:sequence>
      </xsd:complexType>

    </xsd:schema>

 

I added attribute Type for the Password element in WSDL. The Webservice is using PasswordText as the type.

 

Below is the generated code of the security class

public class OasisSecurity {
    public class Password_element {
        public String Type_x;
        private String[] Type_x_att_info = new String[]{'Type'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class TimeStamp {
        public DateTime Created;
        public DateTime Expires;
        private String[] Created_type_info = new String[]{'Created','http://www.w3.org/2001/XMLSchema','dateTime','0','1','false'};
        private String[] Expires_type_info = new String[]{'Expires','http://www.w3.org/2001/XMLSchema','dateTime','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{'Created','Expires'};
    }
    public class UsernameToken {
        public String Username;
        public OasisSecurity.Password_element Password;
        private String[] Username_type_info = new String[]{'Username','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] Password_type_info = new String[]{'Password','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','Password_element','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{'Username','Password'};
    }
    public class SecurityHeaderType {
        public OasisSecurity.UsernameToken UsernameToken;
        public OasisSecurity.TimeStamp TimeStamp;
        private String[] UsernameToken_type_info = new String[]{'UsernameToken','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','UsernameToken','1','1','false'};
        private String[] TimeStamp_type_info = new String[]{'TimeStamp','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','TimeStamp','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{'UsernameToken','TimeStamp'};
    }
}

 

The problem i am facing is, i am able to assign value to the Type_x of the Password_element class.

But i am unable to set the value to the Password .

 

This is how the header part of my request looks like

<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header><Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><UsernameToken><Username>Administrator</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText" /></UsernameToken><TimeStamp><Created>2010-07-28T17:42:25.966Z</Created><Expires>2010-11-25T17:42:25.966Z</Expires></TimeStamp></Security></env:Header>

 And it can be seen in header that i am just able to pass the attribute Type of Password tag and unable to set Value for Password.

 

I am getting the below error message after the webservice callout.

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Fault occurred while processing. faultcode=ns1:client faultactor=

 

Any help on this will be highly appreciated.

Hi,

 

I want to know how can i send username and password as security header which will be part of http header request.

I have WSDL, from which i generated Apex stubs.

The generated Apex stubs does not have any functionality related to security header.

I am getting ann error message, "error discovered processing the wsse:security header".

 

Can any one let know what is the reason for getting the error message?

 

Thanks in advance for any help.

Hi,

 

I am trying to invoke the webservice and getting the below error message.

 Web service callout failed: WebService returned a SOAP Fault: An error was discovered processing the <wsse:Security> header faultcode=ns1:InvalidSecurity faultactor=

This is how inputeHeaders are constructed.

 

aa.inputHttpHeaders_x.put('sessionID', userinfo.getSessionId());        

aa.inputHttpHeaders_x.put('serverURL', serverUrl);

And here, i have the code for invoking the webservice.

 

Can anyone let me know why this issue is faced?

 

Any suggestions or response will be appreciated.

Thanks in advance.

 

Here  my scinario is  if  my Account name is not empty then it should be insert 2 records and current record  but  insertion is failed.

 

 

trigger mergeAccs on Account (after insert) {
list<Account> acs=new list<Account>{new Account(name='mergeAN1'),new Account(name='AnveMerge2')};
  for(Account AC:trigger.new){
   if(ac.name!=' '){
   insert acs;
}
}
}

is it possible to execute triggers in devoloper console?how? need to execute anonoumous code or can we directly executes it?

Can any body help me can we deploye profiles from sandbox to production.....?

Hi, could use some thoughts here.  Trying to get a trigger to populate a lookup field when an account record is created or updated.  I have a custom object, Sales_Grid_Assignment__c, for storing zipcodes and related data.  The intent of the trigger is to match the account's zipcode to a custom object record and populate the lookup field with the custom object record id.   Code works great in Sandbox.  In production, if the account record creation is by lead conversion, I get following error, but only if the user wants to create an opportunity upon conversion as well as a new company record.

 

Error: System.LimitException: Too many query rows: 50001 (System Code) Class.AssignSalesGrid.getGrid: line 6, column 1 Trigger.PrimaryAccountTrigger: line 4, column 1

 

I don't have anywhere near 50,000 custom object records, but I tried putting a LIMIT on the query anyway.  No joy.  Anyone see any glaring omissions or mistakes?  Thanks!

 

Here is the code for Trigger and Class...

 

TRIGGER:

trigger PrimaryAccountTrigger on Account (before insert, before update) {
    
 LIST<Account> company = Trigger.new;
 AssignSalesGrid.getGrid(company);

}

 

CLASS:

public class AssignSalesGrid {

    public static void getGrid(LIST<Account> company){
        
        List<Sales_Grid_Assignment__c> salesgrids = new List<Sales_Grid_Assignment__c>();
        salesgrids = [Select Id, Name
                from Sales_Grid_Assignment__c LIMIT 50000];
        
        Map <string,Id> mapGrids = new Map<string,Id>();
            for (Sales_Grid_Assignment__c sg: salesgrids)  {
          
                mapGrids.put(sg.Name,sg.Id);    
            }
    for (Account a :company){
            a.Sales_Grid_Assignment__c = mapGrids.get(a.BillingPostalCode);
        }
        
    }
}

  • June 21, 2013
  • Like
  • 0

What does it cost to host an app in appexchange?

Hi All,

 

I tried to create a Tab for an object but the object name is not available in alvailasble.

 

Please hlep any one one this regards.

 

Thanks,

Siva.

Hi All,

 

I wish to stop the creating Tab for an particular object.

 

Could you please help some one...

 

Thanks,

 Siva

I have two picklist fields in my application and when I edit the record those two field values getting changed to --None-- everytime.

 

When I save the record those two fields gets saved as none itself. Which is very big bug.

 

Please help me in this issue.

Hi,

 

Is it possible to make the standard field Name of a custom object invisible?
Field Name can not be removed from a page layout. Is there a way to make it invisible?

 

Best regards,

Altran 

Hi,

 

How can we change the label of the standard field Name of a custom object?

 

Best regards,

Altran

Hi I am trying to map some fileds from salesforce to another organisation where i am mapping an sobject to prophecy objecy I am getting this error

 

common.apex.runtime.impl.SObjectList cannot be cast to common.apex.runtime.impl.ScalarList.

 

 

Can some one tell me when this error comes

Hi All,

 

I'm doing a project with SFDC api, to upload object values. See some objects have fields as xx__cSpecified, which is a bool type.

 

If there si  a field a__c, there should be a new field a__cSpecified

 

b__c, b__cSpecified

c__c, c__cSpecified.

 

if I upload a field value to SFDC, I ned to write

 

obj.a__c = "xx";

 

Should I set value for a__cSpecified? such as below code:

obj.a__cSpecified = true;

 

Thanks

Kunlun

  • December 20, 2012
  • Like
  • 0

Hi , Can we create a mock user for testclass along with the Role 

 

For Eg: 'Custom Profile' with 'Manager Role'

 

I am able to retrive both Profile id and role id. of which assining it to the new users respective Field.

 

But i am unable to get the user Created as it Throws an MIXED_DML_OPERATION.

 

also tried with the workaround from Blogs to use @future annotation. by this it excecutes fine but dose not asign the role in the Context.

 

Please leme know if i am missing anything.

I'm running into this error: Invalid integer: common.apex.runtime.impl.ScalarList@b5144800 when executing the following code.  The code compiles with no problem.  I'm fairly certain I have my data types correct - not really sure what's causing this? Any ideas? 

 

   public Map<Target_HCP__c, Integer> targetsWithCalls = new Map<target_HCP__c, Integer>();
        
    public void updateCalls(){
            Map<Id, Integer> acctCalls = new Map<Id, Integer>();
            List<AggregateResult> r = [SELECT Account_vod__c acctid, COUNT(id) totalCalls
                           FROM Call2_vod__c 
                           WHERE Call_Date_vod__c =THIS_QUARTER
                           AND Status_vod__c = 'Submitted_vod'                            
                           GROUP BY Account_vod__c];
            for(AggregateResult i : r){
                acctCalls.put(String.valueOf(i.get('acctId')), integer.valueOf(i.get('totalCalls')));
                system.debug(' account>>> ' + i.get('acctid') + 'number of calls>>> '+i.get('totalCalls'));
            }  
           
   
         
         for(Target_HCP__c t : [SELECT id, Calls_Actual__c, Prescriber__c 
                                     FROM Target_HCP__c 
                                     WHERE Prescriber__c = :acctCalls.KeySet()]){
             targetsWithCalls.put(t, integer.valueOf(acctCalls.Values()));
             t.Calls_Actual__c += integer.valueOf(targetsWithCalls.Values());
             targetsToUpdate.add(t);
         }
            update targetsToUpdate;                     
         }

 

 

Hi community ,

 

Let me give backround about my requirement.

I need to populate a Look up field with the campaign Name (The campaign name  is already existing on opportunity this will keep changing when a new campaign member added to the contact(In retrun this contact will be related to the opportunity)) when the stage on opportunity set to closed won or Closed lost the specific name in the Campaign Name should be populated in the Lookup field . For the new records it works fine by batch process . but for populating the existing records i need a process.

 

Do any body have ideas or come across this .

 

Thanks in advance for your time and help. 

 

Any recomendations on reducing Data Storage in Salesforce?

  • December 19, 2012
  • Like
  • 0

Hi

 

How to assign visualforce pagetab as a default tab  to all applications(apps) at a time with out assigning individually?can anybody help me?

Hi

Afetr login into salesforce instance how will get visualforce page as a home page?can anybody will help me?

 

Thanks&Regards

Hi Guys,

 

If there's a way to delete related list when parent is set to private?.

 

Scenario:.

 

I have a 2 users. User X and User Y with same Role Hierarchy. Then I set up the Permission Set give delete access on the object. and I also create a public group then tick the Grant Access Using Hierarchies.

 

I logged as a User X When I tried to Delete the Related List Created by User Y. System said that User X don't have access to delete the record.

 

please share you thoughts and ideas.

 

I hope someone help me to my problem.

 

Thanks,

sniper_semaj

Currently I am able to send the Header in the Soap request in 2 ways as shown below:

 

1st way

<env:Header>

            <Security xmlns ="http://schemas.xmlsoap.org/ws/2003/06/secext">

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password>abc123</Password>            (Password here is simple xsd:string type)

                        </UsernameToken>

            </ Security>

</env:Header>

 

And like this:

2nd way

<env:Header>

            <Security xmlns ="http://schemas.xmlsoap.org/ws/2003/06/secext">

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type=”PasswordText” />

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

But this is the header that I require (marked in Red):

<env:Header>

            <Security xmlns ="http://schemas.xmlsoap.org/ws/2003/06/secext" soapenv:mustUnderstand="1">

                        <UsernameToken>

                                    <Username>abcde</Username>

                                    <Password Type= “PasswordText”>abc123</Password>

                        </UsernameToken>

            </ Security>

</env:Header>

 

 

What I am unable to create 2 things as shown above:

  1. I can send either password type or password value, but not both together.
  2. I cannot add soapenv:mustUnderstand="1" in Security tag.

Is there way to achieve it by making modification in the Apex class or any other way?

 

Thank you.