• AkiraDio
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 16
    Replies

Faced with this problem, I want to create Apex Class from WSDL, but get an error:

Error: Failed to parse wsdl: Found more than one wsdl:binding. WSDL with multiple binding not supported

My WSDL:

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="Tset">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="a" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="b" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="TsetResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="TsetResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="TsetSoapIn">
    <wsdl:part name="parameters" element="tns:Tset" />
  </wsdl:message>
  <wsdl:message name="TsetSoapOut">
    <wsdl:part name="parameters" element="tns:TsetResponse" />
  </wsdl:message>
  <wsdl:portType name="Service1Soap">
    <wsdl:operation name="Tset">
      <wsdl:input message="tns:TsetSoapIn" />
      <wsdl:output message="tns:TsetSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Tset">
      <soap:operation soapAction="http://tempuri.org/Tset" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="Service1Soap12" type="tns:Service1Soap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Tset">
      <soap12:operation soapAction="http://tempuri.org/Tset" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service1">
    <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
      <soap:address location="http://demo17841.atservers.net/Service1.asmx" />
    </wsdl:port>
    <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
      <soap12:address location="http://demo17841.atservers.net/Service1.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

 Web-service: http://demo17841.atservers.net/Service1.asmx?WSDL

Never had to deal with WSDL, please help!

 

Hello!

I need to make a HTTP request to trigger.

But SFDC disallowed it.

How can I get out of this situation?

My code:

            String MailBody = obj.co_coname__c + '\\n\\n' + obj.CreatedDate + '\\n' + ' FAO ' +
            obj.Account.FirstName + ' ' + obj.Account.LastName + '\\n\\n' +
            'Reservation Number ' + obj.co_coname__c + '.\\n\\n' +
            'Your booking has now been confirmed.\\n\\n Please note: All hire bookings are subject to our hire terms and conditions which can be read here:\\n\\n' + obj.co_legal__c +
            '\\n\\n On completion of your hire, post hire charges may apply - a Post Hire Charges Schedule is available to read here:\\n\\n' + obj.co_surcharges__c +
            '\\n\\n Please review your booking details and complete the Cardholder Authorisation Form using the Docusign link below.\\n\\n By using Docusign, you can electronically sign and complete this document.\\n\\n (After you complete the form, all parties will receive a final PDF copy by email)\\n\\n';
            String Body = '{\n  \"emailSubject\": \"' + 'Booking Details ' + obj.Name + '",\n  \"emailBlurb\": \"'+ MailBody +'\",\n  \"templateId\": \"49131602-40EB-4548-AC8E-DE16DC9BE450\",\n  \"templateRoles\": [\n    {\n      \"roleName\": \"Signer 1\",\n      \"name\": \"'+ obj.Account.FirstName + ' ' + obj.Account.LastName +'\",\n      \"email\": \"'+ obj.Hirer_Email__c +'\"\n    }\n  ],\n  \"status\": \"sent\"\n}';    
            HttpRequest req = new HttpRequest();
            req.setEndpoint('https://demo.docusign.net/restapi/v2/accounts/279584/envelopes');
            req.setMethod('POST');
            String    authenticateStr =  '{\"Username\":\"soloho@rogers.com\",\"Password\":\"docu777\",\"IntegratorKey\":\"WEBS-3d5dc187-4870-4a52-9276-3458da82699b\"}';
            req.setHeader('X-DocuSign-Authentication', authenticateStr);
             req.setHeader('Content-Type', 'application/json');     
             req.setHeader('Content-Length', String.valueOf(Body.length()));
             req.setHeader('Accept', 'application/json');   
             Http http = new Http();
             HTTPResponse res = http.send(req);
             Result = res.getBody();

 

Hello!

I want to access the DocuSign API in your Force.com / Salesforce.com account in order to send an object with a single click of a button.

I usee this manual: http://developer.force.com/cookbook/recipe/accessing-docusign-api-from-salesforcecom-to-send-contracts-for-esignatures

The problem is such that when you click on the button I get an error:

Exception - System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: An Error Occurred during anchor tag processing. Invalid document faultcode=soap:Client faultactor=https://demo.docusign.net/api/3.0/dsapi.asmx

Code:

public class Test
{
    private final Opportunity Opp;   
    public String envelopeId {get;set;}
    private String accountId = 'xxxxxx';
        //private String accountId = '001e0000007fBIV';
    private String userId = 'xxxxxxx';    
    private String password = 'xxxxxxxx';
    private String integratorsKey = 'xxxxxxxxx';
    private String webServiceUrl
        = 'https://demo.docusign.net/api/3.0/dsapi.asmx?op=CreateAndSendEnvelope';      
       
    public Test()
    {                         
        Opp = [select id from Opportunity where id='006e0000003EEUf' limit 1];
        envelopeId = 'Not sent yet';    
        //SendNow();
    }
    public void SendNow()
    {
        DocuSignAPI.APIServiceSoap dsApiSend
            = new DocuSignAPI.APIServiceSoap();
        dsApiSend.endpoint_x = webServiceUrl;
        //Set Authentication
        String auth = '<DocuSignCredentials><Username>'+ userId
            +'</Username><Password>' + password
            + '</Password><IntegratorKey>' + integratorsKey  
            + '</IntegratorKey></DocuSignCredentials>';
        System.debug('Setting authentication to: ' + auth);        
        dsApiSend.inputHttpHeaders_x = new Map<String, String>();
        dsApiSend.inputHttpHeaders_x.put('X-DocuSign-Authentication',
            auth);
                DocuSignAPI.Envelope envelope = new DocuSignAPI.Envelope();
        envelope.Subject = 'Please Sign this Contract: '
            + contract.ContractNumber;
        envelope.EmailBlurb = 'This is my new eSignature service,'+
            ' it allows me to get your signoff without having to fax, ' +
            'scan, retype, refile and wait forever';
        envelope.AccountId  = accountId;    
        
                // Render the contract
        System.debug('Rendering the contract');
        PageReference pageRef = new PageReference('/apex/Test');
        Blob pdfBlob = pageRef.getContent();   
        
        // Document
        DocuSignAPI.Document document = new DocuSignAPI.Document();
        document.ID = 1;
        document.pdfBytes = EncodingUtil.base64Encode(pdfBlob);
        document.Name = 'Booking Details';
        document.FileExtension = 'pdf';
        envelope.Documents = new DocuSignAPI.ArrayOfDocument();
        envelope.Documents.Document = new DocuSignAPI.Document[1];
        envelope.Documents.Document[0] = document;        
        
        // Recipient
        System.debug('getting the contact');
        Contact contact = [SELECT email, FirstName, LastName
            from Contact where id = '003e0000005P1fw'];
        
        DocuSignAPI.Recipient recipient = new DocuSignAPI.Recipient();
        recipient.ID = 1;
        recipient.Type_x = 'Signer';
        recipient.RoutingOrder = 1;
        recipient.Email = contact.Email;
        recipient.UserName = contact.FirstName + ' ' + contact.LastName;
        
        recipient.RequireIDLookup = false;          
        envelope.Recipients = new DocuSignAPI.ArrayOfRecipient();
        envelope.Recipients.Recipient = new DocuSignAPI.Recipient[1];
        envelope.Recipients.Recipient[0] = recipient;        
        DocuSignAPI.Tab tab1 = new DocuSignAPI.Tab();
        tab1.Type_x = 'SignHere';
        tab1.RecipientID = 1;
        tab1.DocumentID = 1;
        tab1.AnchorTabItem = new DocuSignAPI.AnchorTab();
        tab1.AnchorTabItem.AnchorTabString = 'By:';

        
        DocuSignAPI.Tab tab2 = new DocuSignAPI.Tab();
        tab2.Type_x = 'DateSigned';
        tab2.RecipientID = 1;
        tab2.DocumentID = 1;
        tab2.AnchorTabItem = new DocuSignAPI.AnchorTab();
        tab2.AnchorTabItem.AnchorTabString = 'Date Signed:';
        
        envelope.Tabs = new DocuSignAPI.ArrayOfTab();
        envelope.Tabs.Tab = new DocuSignAPI.Tab[2];
        envelope.Tabs.Tab[0] = tab1;        
        envelope.Tabs.Tab[1] = tab2;     
        
        System.debug('Calling the API');
        try {
            DocuSignAPI.EnvelopeStatus es
            = dsApiSend.CreateAndSendEnvelope(envelope);
            envelopeId = es.EnvelopeID;
        } catch ( CalloutException e) {
            System.debug('Exception - ' + e );
            envelopeId = 'Exception - ' + e;
        }
                            
    }
}

 Call:

    <apex:form >
                                                        <apex:commandButton value="OK" styleClass="submitButtonNew"
                                                            action="{!SendNow}" />
   </apex:form>

 

Need help!

 

Good day! Please help with the preparation of the query. I have to make a custom report based on a standard.
How do I properly create a query to select all Opp on criteria which are shown below?

 

Good day!
I'm creating a Task of VF page.
How do I change the value of a controller Send Notification Email?

 

Good day! I have two questions:
1. How to sort List?
2. How to sort the Map?
Sorting must take place not in the query.
Example:
Map <id,Action_Goal__c> aMap = new Map <id,Action_Goal__c> (
                                  [select Goal_Description__c, id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c
                                     From Action_Goal__c
                                     Where ToLabel (Goal_Type__c) =: MyGoalType]);

  List <Action_Goal__c> MyActGoalsDescList = aMap.values ();

I need to sort by Targeted_Due_Date__c.

Good day!
I'm having trouble sorting out the sample object.

Sort by Order by does not help (

 

Here is the code of the sample:

              Map<id,Action_Goal__c> aMap = new Map<id,Action_Goal__c>(
                                 [select Goal_Description__c ,id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c, CreatedDate, Agreed_Commitment__c, Coaching_Focus__c, Comments__c, Team_Member__c, Team_Member__r.Name
                                    From Action_Goal__c
                                    Where ToLabel(Goal_Type__c) =:MyGoalType
                                       AND ((CALENDAR_Year(Targeted_Due_Date__c)= :MyYear AND CALENDAR_Month(Targeted_Due_Date__c)= :MyMonth)
                                            OR ( Status__c !=:BusinessPlanUtil.Completed ) )
                                       AND (CreatedById =:MyUserID) order by Targeted_Due_Date__c]);

 I need to sort by Targeted_Due_Date__c. But sampling with sorting does not work.

Just in case the page and post the code of the controller.

page:

<apex:repeat var="PP" value="{!OwnerChildUserIDList}" >
            <span style="color : #1F1F1F; font-size : 14px; font-weight: bold;">{!PP.Name}</span><br/><br/>
            <apex:repeat var="item" value="{!MyActGoalsDescList}" >
                <apex:DataTable value="{!MyMonthlyPlanID}" var="fg" styleClass="bhpb-act bhpb-base bot-margin row-highlight" columnsWidth="100px,100px,100px,50px, 30px, 30px" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}">
                    <apex:column style="text-align: left;" headervalue="{!$Label.Coaching_Focus}" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}">
                        <apex:commandLink action="{!OpenActivityDescDetail}" value="{!item.Coaching_Focus__c}">         
                                <apex:param name="adID" value="{!item.id}" />
                        </apex:commandLink>                      
                    </apex:column>  
                    <apex:column style="text-align: left;" headervalue="{!$Label.Agreed_Commitment}" value="{!item.Agreed_Commitment__c}" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}"/>  
                    <apex:column style="text-align: left;" headervalue="{!$Label.Comments}" value="{!item.Comments__c}" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}"/>              
                    <apex:column style="" headervalue="{!$Label.Goal_set_in}" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}">
                        <apex:outputText value="{0,date,MMMM', 'yyyy}">
                            <apex:param value="{!item.CreatedDate}" /> 
                        </apex:outputText>
                    </apex:column>
                    <apex:column style="" headervalue="{!$Label.Due_Date}" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}">  
                         <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
                            <apex:param value="{!item.Targeted_Due_Date__c}" /> 
                        </apex:outputText>
                    </apex:column>     
                    <apex:column style="" headervalue="{!$Label.Status}" value="{!item.Status__c}" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}"/>                       
                </apex:DataTable> 
               <c:MyActionGoals Lang="{!MyLang}" ActionGoalID="{!item.ID}" UserType="{!MyUserType}" MyActGoals="{!MyActGoals}" Year="{!MyYear}" Month="{!MyMonth}" UserID="{!MyUserID}" MyMonthlyPlanID="{!MyMonthlyPlanID}" rendered="{!IF(item.Team_Member__r.Name == PP.Name,true,false)}" IsPrint="{!isPrint}" />
             </apex:repeat> 
             <br/>
</apex:repeat>

 

 

controller:

public with sharing class MyActionTeamGoalsDesc_controller
{
  public String Mylang {get;set;}
   public String MyMonthlyPlanID {get;set;}
   public Integer MyYear {get;set;}
   public Integer MyMonth {get;set;}
   public String MyGoalType {get;set;}
   public String MyUserType {get;set;}
   public String  adID {get; set;}
   public String  prefix {get; set;}
   public String MyUserID  {get;set;}
   public Boolean Flag {get; set;}

   public List<MyActGoals__c> MyActGoals {get;set;}
   

      public List<User> OwnerChildUserIDList
    {
        get
        {
        List<User> UserIDList = new List<User>();   
        List<User> UserRoleId = new List<User>([select UserRoleId
                               from User 
                               where ID =:MyUserID]);    
            
        List<User> ChildUserList =new List<User>([select Name 
                                   from User 
                                   where UserRole.ParentRoleId =:UserRoleId[0].UserRoleId
                                    and IsActive =true ORDER by Name]);             
         
                for(User user:ChildUserList)
                {
                    UserIDList.add(user);
                }
                                                                 
        return         UserIDList;    
        }
        set;    
    
   }  
   

   // get MyYear MyMonth, not completed action plan(goal) description group by action plan type for MyUserID
   public List<Action_Goal__c> MyActGoalsDescList
   {
      get
      {
            Flag = false;   
          List<Action_Goal__c> MyActGoalsDescList = new List<Action_Goal__c>();
          if ((MyGoalType != null) && (MyGoalType !=''))
          {

//              Date MyDate = getStartDate();
              Map<id,Action_Goal__c> aMap = new Map<id,Action_Goal__c>(
                                 [select Goal_Description__c ,id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c, CreatedDate, Agreed_Commitment__c, Coaching_Focus__c, Comments__c, Team_Member__c, Team_Member__r.Name
                                    From Action_Goal__c
                                    Where ToLabel(Goal_Type__c) =:MyGoalType
                                       AND ((CALENDAR_Year(Targeted_Due_Date__c)= :MyYear AND CALENDAR_Month(Targeted_Due_Date__c)= :MyMonth)
                                            OR ( Status__c !=:BusinessPlanUtil.Completed ) )
                                       AND (CreatedById =:MyUserID) order by Targeted_Due_Date__c]);
                
              if (aMap.isEmpty())
              {
                Action_Goal__c tmp = new Action_Goal__c();
                tmp.Goal_Description__c =' ';
                MyActGoalsDescList.add(tmp);
              }
              else
              {
                MyActGoalsDescList = aMap.values() ;
                //MyActGoalsDescList.sort();
                MyActGoals= new List<MyActGoals__c> ();
                Set<id> whatIDSet = aMap.keySet() ;
                MyActGoals = getMyActGoalsList(whatIDSet);
              }
              Flag = true;
          }
         return MyActGoalsDescList;
    }
    set;
   }




// Click Open action Plan detail
   public PageReference OpenActivityDescDetail()
   {
     adID = System.currentPageReference().getParameters().get('adID');


     PageReference ActDescPage = new PageReference('/' + adID );
     return ActDescPage;
   }

   private List<MyActGoals__c> getMyActGoalsList(set<id> whatIDSet)
   {

          List<MyActGoals__c> MyActGoalsList = new List<MyActGoals__c>();

          if (!(whatIDSet.isEmpty()))
          {
            //get Task Information
             for (Task Tk : [select WhatID,Type__c,Subject,Who.firstname,Who.lastname,Purpose__c,Status,ActivityDate,ID, Description
                             From Task
                             Where (WhatID IN :whatIDSet)  AND (OwnerId =:MyUserID)
                             order by ActivityDate
                             ])
             {
               MyActGoals__c tmp = new MyActGoals__c();
               tmp.Goal_Description__c =Tk.WhatID;
               tmp.Due_Date__c = Tk.ActivityDate ;
               tmp.Status__c = Tk.Status;
               tmp.What_is_the_Purpose__c = Tk.Subject;
               tmp.What_is_the_Activity__c = Tk.Type__c;
               tmp.ID__c = Tk.ID;
               tmp.Who_is_it_With__c =Tk.Who.firstname+' ' +Tk.Who.lastname;
               IF(tmp.Who_is_it_With__c=='null null') {tmp.Who_is_it_With__c = System.Label.Not_Assigned;}
               tmp.Comments__c = Tk.Description;    

               MyActGoalsList.add(tmp);
             }

             //get Event Information
             for (Event ev : [select WhatID,Type__c,Subject,Who.firstname,Who.lastname,ActivityDate, EndDateTime,Account.Name, ID, Description
                                   From Event
                                    Where (WhatID IN :whatIDSet) AND (OwnerId =:MyUserID)
                                     order by WhatID
                                  ])
             {
                  MyActGoals__c tmp = new MyActGoals__c();
                  tmp.Goal_Description__c = ev.WhatID;
                  tmp.Due_Date__c = ev.ActivityDate ;

                  tmp.What_is_the_Purpose__c = ev.Subject;
                  tmp.What_is_the_Activity__c = ev.Type__c;
                  tmp.Comments__c = ev.Description; 
                  tmp.ID__c = ev.ID;
                  tmp.Who_is_it_With__c =ev.Who.firstname+' ' +ev.Who.lastname;
                  IF(tmp.Who_is_it_With__c=='null null') {tmp.Who_is_it_With__c = System.Label.Not_Assigned;}

                   MyActGoalsList.add(tmp);
              }
         }
         else
         {
            MyActGoalsList = null;
         }
         return MyActGoalsList ;

   }

}

 

 

 

Good day!
I write a trigger and ran into a problem ((

In the info_c comes this value:
Scott; Kavanagh; The Art Of; Vice President; 416-555-5555; scott@theartof.com | Steve; Comrie; Simplicate Interactive; Owner; 416-555-5555; steve@simplicate.ca | John; Smith; Rogers; Marketing Assistant; 416-555-5555; john.smith @ rogers.com

 

I need to convert this value and add to object Сontacts:

1st contact:
First Name - Scott
Last Name - Kavanagh
Company - The Art Of
Job Title - Vice President
Phone - 416-555-5555
Email - scott@theartof.com

2nd contact:
First Name - Steve
Last Name - Comrie
Company - Owner
Job Title - Vice President
Phone - 416-555-5555
Email - steve@simplicate.ca

 

N nd contact:

.......

 

How do I make it?

 

Good day!

I have a table:

<Apex: DataTable value = "{! MyActGoalsDescList}" var = "GP" rowClasses = "odd, even" styleClass = "bhpb-act bhpb-base bot-margin row-highlight" columnsWidth = "100px, 500px, 150px, 150px , 150px ">
    
<apex:column style="text-align:" headervalue="{!$Label.Goal_set_in}">
    
<apex:outputText value="{0,date,MMMM','yyyy}">
    
<apex:param value="{!GT.CreatedDate}" />
</ Apex: outputText>
    
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Due_Date}">
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    
<apex:param value="{!GT.Targeted_Due_Date__c}" />
</ Apex: outputText>
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Status}" value="{!GT.Status__c}" />
</ Apex: DataTable>

 



The source for this table:

public List<Action_Goal__c> MyActGoalsDescList
   {
      get
      {
          List<Action_Goal__c> MyActGoalsDescList = new List<Action_Goal__c>();
          if ((MyGoalType != null) && (MyGoalType !=''))
          {
//              Date MyDate = getStartDate();
              Map<id,Action_Goal__c> aMap = new Map<id,Action_Goal__c>(
                                 [select Goal_Description__c ,id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c, CreatedDate
                                    From Action_Goal__c
                                    Where ToLabel(Goal_Type__c) =:MyGoalType
                                       AND ((CALENDAR_Year(Targeted_Due_Date__c)= :MyYear AND CALENDAR_Month(Targeted_Due_Date__c)= :MyMonth)
                                            OR ( Status__c !=:BusinessPlanUtil.Completed ) )
                                       AND CreatedById =:MyUserID
                                  ]);
                
              if (aMap.isEmpty())
              {
                Action_Goal__c tmp = new Action_Goal__c();
                tmp.Goal_Description__c =' ';
                MyActGoalsDescList.add(tmp);
              }
              else
              {
                MyActGoalsDescList = aMap.values() ;
                MyActGoals= new List<MyActGoals__c> ();
                Set<id> whatIDSet = aMap.keySet() ;
                MyActGoals = getMyActGoalsList(whatIDSet);
              }
          }
         return MyActGoalsDescList;
    }
    set;
   }

How do I make sure that if MyActGoalsDescList empty table does not render?

 

 

 

Good day!
As in the apex controller to get a user ID and page ID VF, in String variable?

Good day!

This problem:
There is a code in the controller:
               Map <id,Action_Goal__c> aMap = new Map <id,Action_Goal__c> (
                                  [select Goal_Description__c, id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c, CreatedDate
                                     From Action_Goal__c
                                     Where ToLabel (Goal_Type__c) =: MyGoalType
                                        AND ((CALENDAR_Year (Targeted_Due_Date__c) =: MyYear AND CALENDAR_Month (Targeted_Due_Date__c) =: MyMonth)
                                             OR (Status__c! =: BusinessPlanUtil.Completed))
                                        AND CreatedById =: MyUserID
                                   ]);

Output the variable in VisualForce:
<apex:column style="text-align:" headervalue="Goal set in" value="{!GT.CreatedDate}" />
The result:
Wed Sep 05 10:06:20 GMT 2012

required:
1. List only month
2. Convert to user's local time

Forgive you for help!

There is a table:
http://akiradio-developer-edition.na9.force.com/

 

Value Portfolio Revenue Run Rate and IPT Revenue Target for your line of business are set by default. Requires that by clicking on the field could change the value, and perform calculations.


Sorry for my English.

 

 

 


code:

public class DecimalController
{
    public Decimal Portfolio {get; set;}
    public Decimal Revenue_Target {get; set;}
    public Decimal Estimated {get; set;}
    public Decimal Estimated_Revenue {get; set;}
    public Decimal Market {get; set;}
    public Decimal Net_Annualized {get; set;}
    
    
    public string Portfolio_name {get; set;}
    public string Revenue_Target_name {get; set;}
    public string Estimated_name {get; set;}
    public string Estimated_Revenue_name {get; set;}
    public string Market_name {get; set;}
    public string Net_Annualized_name {get; set;}
    
    public string Error {get; set;}
    
    
    public DecimalController ()
    {
        Portfolio = 1500000;
        Revenue_Target = 1600000;
        Portfolio_name = 'Portfolio Revenue Run Rate';
        Estimated_Revenue_name = 'Estimated Revenue Attrition Rate';
        Revenue_Target_name = 'IPT Revenue Target for your line of business';
        Market_name = 'Market Effect';
        Estimated_name = 'Estimated Gross Annualized Revenue Target';
        Net_Annualized_name = 'Net Annualized Revenue Target';
        
    }
    
    public PageReference reckoning ()
        {
            if (Estimated_Revenue> = 0 && Market> = 0)
            {
                decimal result = Portfolio * Estimated_Revenue/100 + (Revenue_Target - Portfolio) * 2 - ((Market/100) * Portfolio);
                Estimated = result;
                Net_Annualized = result / 2;
            }
            else
            {
            
                Error = 'Error, enter values> 0 or = 0';
                

            }
           return null;
         }

        

}


<apex:page controller="DecimalController" showHeader="false" sidebar="false">
<apex:pageBlock title="Goal calculator">
<apex:pageBlockSection>
        <apex:form>
            <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Portfolio_name}" width="300"/>
                <apex:column value="{!Portfolio}"/>
            </ Apex: pageBlockTable>
 
            <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Estimated_Revenue_name}" width="300"/>
                <apex:column>
                    <apex:inputText value="{!Estimated_Revenue}"/>
                </ Apex: column>
            </ Apex: pageBlockTable>

            <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Revenue_Target_name}" width="300"/>
                <apex:column value="{!Revenue_Target}"/>
            </ Apex: pageBlockTable>

             <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Market_name}" width="300"/>
                <apex:column>
                    <apex:inputText value="{!Market}"/>
                </ Apex: column>
            </ Apex: pageBlockTable>
            <apex:commandButton action="{!reckoning}" value="reckoning"/>
            
             <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Estimated_name}" width="300"/>
                <apex:column value="{!Estimated}"/>
            </ Apex: pageBlockTable>
            
             <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Net_Annualized_name}" width="300"/>
                <apex:column value="{!Net_Annualized}"/>
            </ Apex: pageBlockTable>
            {! Error}
    
                               
        </ Apex: form>
</ Apex: pageBlockSection>
</ Apex: pageBlock>
    
</ Apex: page>

I apologize for my English. Let me explain the problem. I want to create a controller that does not use a database and work with it using the apex: pageBlockTable. For example: There are variables:

decimal a = 10;

decimal b = 20;

decimal c = 30;

I want to make a table using the apex: pageBlockTable.:

-------------------------

|variable one | 10 |

------------------------

| variable two | 20 |

------------------------

| variable three | 30 |

------------------------

How make?

trigger HandleProductPriceChange on Merchandise__c (after update) {

    List<Line_Item__c> openLineItems =
        [SELECT j.Unit_Price__c, j.Merchandise__r.Price__c
         FROM Line_Item__c j
         WHERE j.Invoice_Statement__r.Status__c = 'Negotiating'
         AND j.Merchandise__r.id IN :Trigger.new
         FOR UPDATE];

    for (Line_Item__c li: openLineItems) {
        if ( li.Merchandise__r.Price__c < li.Unit_Price__c ){
        li.Unit_Price__c = li.Merchandise__r.Price__c;
        }
    }
    update openLineItems;
}

 

Error: Compile Error: Didn't understand relationship 'Merchandise__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 4 column 9

 

Есть тема(topic): http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/apex/message-id/68444/print-single-message/false/page/1

 

Однако я не совсем понял как ее решить(

I do not understand how to solve it(

 



 

 

  

Hello!

I need to make a HTTP request to trigger.

But SFDC disallowed it.

How can I get out of this situation?

My code:

            String MailBody = obj.co_coname__c + '\\n\\n' + obj.CreatedDate + '\\n' + ' FAO ' +
            obj.Account.FirstName + ' ' + obj.Account.LastName + '\\n\\n' +
            'Reservation Number ' + obj.co_coname__c + '.\\n\\n' +
            'Your booking has now been confirmed.\\n\\n Please note: All hire bookings are subject to our hire terms and conditions which can be read here:\\n\\n' + obj.co_legal__c +
            '\\n\\n On completion of your hire, post hire charges may apply - a Post Hire Charges Schedule is available to read here:\\n\\n' + obj.co_surcharges__c +
            '\\n\\n Please review your booking details and complete the Cardholder Authorisation Form using the Docusign link below.\\n\\n By using Docusign, you can electronically sign and complete this document.\\n\\n (After you complete the form, all parties will receive a final PDF copy by email)\\n\\n';
            String Body = '{\n  \"emailSubject\": \"' + 'Booking Details ' + obj.Name + '",\n  \"emailBlurb\": \"'+ MailBody +'\",\n  \"templateId\": \"49131602-40EB-4548-AC8E-DE16DC9BE450\",\n  \"templateRoles\": [\n    {\n      \"roleName\": \"Signer 1\",\n      \"name\": \"'+ obj.Account.FirstName + ' ' + obj.Account.LastName +'\",\n      \"email\": \"'+ obj.Hirer_Email__c +'\"\n    }\n  ],\n  \"status\": \"sent\"\n}';    
            HttpRequest req = new HttpRequest();
            req.setEndpoint('https://demo.docusign.net/restapi/v2/accounts/279584/envelopes');
            req.setMethod('POST');
            String    authenticateStr =  '{\"Username\":\"soloho@rogers.com\",\"Password\":\"docu777\",\"IntegratorKey\":\"WEBS-3d5dc187-4870-4a52-9276-3458da82699b\"}';
            req.setHeader('X-DocuSign-Authentication', authenticateStr);
             req.setHeader('Content-Type', 'application/json');     
             req.setHeader('Content-Length', String.valueOf(Body.length()));
             req.setHeader('Accept', 'application/json');   
             Http http = new Http();
             HTTPResponse res = http.send(req);
             Result = res.getBody();

 

Good day! Please help with the preparation of the query. I have to make a custom report based on a standard.
How do I properly create a query to select all Opp on criteria which are shown below?

 

Good day!
I'm creating a Task of VF page.
How do I change the value of a controller Send Notification Email?

 

Good day! I have two questions:
1. How to sort List?
2. How to sort the Map?
Sorting must take place not in the query.
Example:
Map <id,Action_Goal__c> aMap = new Map <id,Action_Goal__c> (
                                  [select Goal_Description__c, id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c
                                     From Action_Goal__c
                                     Where ToLabel (Goal_Type__c) =: MyGoalType]);

  List <Action_Goal__c> MyActGoalsDescList = aMap.values ();

I need to sort by Targeted_Due_Date__c.

Good day!
I write a trigger and ran into a problem ((

In the info_c comes this value:
Scott; Kavanagh; The Art Of; Vice President; 416-555-5555; scott@theartof.com | Steve; Comrie; Simplicate Interactive; Owner; 416-555-5555; steve@simplicate.ca | John; Smith; Rogers; Marketing Assistant; 416-555-5555; john.smith @ rogers.com

 

I need to convert this value and add to object Сontacts:

1st contact:
First Name - Scott
Last Name - Kavanagh
Company - The Art Of
Job Title - Vice President
Phone - 416-555-5555
Email - scott@theartof.com

2nd contact:
First Name - Steve
Last Name - Comrie
Company - Owner
Job Title - Vice President
Phone - 416-555-5555
Email - steve@simplicate.ca

 

N nd contact:

.......

 

How do I make it?

 

Good day!

I have a table:

<Apex: DataTable value = "{! MyActGoalsDescList}" var = "GP" rowClasses = "odd, even" styleClass = "bhpb-act bhpb-base bot-margin row-highlight" columnsWidth = "100px, 500px, 150px, 150px , 150px ">
    
<apex:column style="text-align:" headervalue="{!$Label.Goal_set_in}">
    
<apex:outputText value="{0,date,MMMM','yyyy}">
    
<apex:param value="{!GT.CreatedDate}" />
</ Apex: outputText>
    
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Due_Date}">
<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
    
<apex:param value="{!GT.Targeted_Due_Date__c}" />
</ Apex: outputText>
</ Apex: column>
<apex:column style="text-align:" headervalue="{!$Label.Status}" value="{!GT.Status__c}" />
</ Apex: DataTable>

 



The source for this table:

public List<Action_Goal__c> MyActGoalsDescList
   {
      get
      {
          List<Action_Goal__c> MyActGoalsDescList = new List<Action_Goal__c>();
          if ((MyGoalType != null) && (MyGoalType !=''))
          {
//              Date MyDate = getStartDate();
              Map<id,Action_Goal__c> aMap = new Map<id,Action_Goal__c>(
                                 [select Goal_Description__c ,id, Goal_Type__c, Targeted_Due_Date__c, Name, Status__c, CreatedDate
                                    From Action_Goal__c
                                    Where ToLabel(Goal_Type__c) =:MyGoalType
                                       AND ((CALENDAR_Year(Targeted_Due_Date__c)= :MyYear AND CALENDAR_Month(Targeted_Due_Date__c)= :MyMonth)
                                            OR ( Status__c !=:BusinessPlanUtil.Completed ) )
                                       AND CreatedById =:MyUserID
                                  ]);
                
              if (aMap.isEmpty())
              {
                Action_Goal__c tmp = new Action_Goal__c();
                tmp.Goal_Description__c =' ';
                MyActGoalsDescList.add(tmp);
              }
              else
              {
                MyActGoalsDescList = aMap.values() ;
                MyActGoals= new List<MyActGoals__c> ();
                Set<id> whatIDSet = aMap.keySet() ;
                MyActGoals = getMyActGoalsList(whatIDSet);
              }
          }
         return MyActGoalsDescList;
    }
    set;
   }

How do I make sure that if MyActGoalsDescList empty table does not render?

 

 

 

Good day!
As in the apex controller to get a user ID and page ID VF, in String variable?

There is a table:
http://akiradio-developer-edition.na9.force.com/

 

Value Portfolio Revenue Run Rate and IPT Revenue Target for your line of business are set by default. Requires that by clicking on the field could change the value, and perform calculations.


Sorry for my English.

 

 

 


code:

public class DecimalController
{
    public Decimal Portfolio {get; set;}
    public Decimal Revenue_Target {get; set;}
    public Decimal Estimated {get; set;}
    public Decimal Estimated_Revenue {get; set;}
    public Decimal Market {get; set;}
    public Decimal Net_Annualized {get; set;}
    
    
    public string Portfolio_name {get; set;}
    public string Revenue_Target_name {get; set;}
    public string Estimated_name {get; set;}
    public string Estimated_Revenue_name {get; set;}
    public string Market_name {get; set;}
    public string Net_Annualized_name {get; set;}
    
    public string Error {get; set;}
    
    
    public DecimalController ()
    {
        Portfolio = 1500000;
        Revenue_Target = 1600000;
        Portfolio_name = 'Portfolio Revenue Run Rate';
        Estimated_Revenue_name = 'Estimated Revenue Attrition Rate';
        Revenue_Target_name = 'IPT Revenue Target for your line of business';
        Market_name = 'Market Effect';
        Estimated_name = 'Estimated Gross Annualized Revenue Target';
        Net_Annualized_name = 'Net Annualized Revenue Target';
        
    }
    
    public PageReference reckoning ()
        {
            if (Estimated_Revenue> = 0 && Market> = 0)
            {
                decimal result = Portfolio * Estimated_Revenue/100 + (Revenue_Target - Portfolio) * 2 - ((Market/100) * Portfolio);
                Estimated = result;
                Net_Annualized = result / 2;
            }
            else
            {
            
                Error = 'Error, enter values> 0 or = 0';
                

            }
           return null;
         }

        

}


<apex:page controller="DecimalController" showHeader="false" sidebar="false">
<apex:pageBlock title="Goal calculator">
<apex:pageBlockSection>
        <apex:form>
            <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Portfolio_name}" width="300"/>
                <apex:column value="{!Portfolio}"/>
            </ Apex: pageBlockTable>
 
            <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Estimated_Revenue_name}" width="300"/>
                <apex:column>
                    <apex:inputText value="{!Estimated_Revenue}"/>
                </ Apex: column>
            </ Apex: pageBlockTable>

            <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Revenue_Target_name}" width="300"/>
                <apex:column value="{!Revenue_Target}"/>
            </ Apex: pageBlockTable>

             <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Market_name}" width="300"/>
                <apex:column>
                    <apex:inputText value="{!Market}"/>
                </ Apex: column>
            </ Apex: pageBlockTable>
            <apex:commandButton action="{!reckoning}" value="reckoning"/>
            
             <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Estimated_name}" width="300"/>
                <apex:column value="{!Estimated}"/>
            </ Apex: pageBlockTable>
            
             <apex:pageBlockTable value="{!Portfolio}" var="i">
                <apex:column value="{!Net_Annualized_name}" width="300"/>
                <apex:column value="{!Net_Annualized}"/>
            </ Apex: pageBlockTable>
            {! Error}
    
                               
        </ Apex: form>
</ Apex: pageBlockSection>
</ Apex: pageBlock>
    
</ Apex: page>

I apologize for my English. Let me explain the problem. I want to create a controller that does not use a database and work with it using the apex: pageBlockTable. For example: There are variables:

decimal a = 10;

decimal b = 20;

decimal c = 30;

I want to make a table using the apex: pageBlockTable.:

-------------------------

|variable one | 10 |

------------------------

| variable two | 20 |

------------------------

| variable three | 30 |

------------------------

How make?

trigger HandleProductPriceChange on Merchandise__c (after update) {

    List<Line_Item__c> openLineItems =
        [SELECT j.Unit_Price__c, j.Merchandise__r.Price__c
         FROM Line_Item__c j
         WHERE j.Invoice_Statement__r.Status__c = 'Negotiating'
         AND j.Merchandise__r.id IN :Trigger.new
         FOR UPDATE];

    for (Line_Item__c li: openLineItems) {
        if ( li.Merchandise__r.Price__c < li.Unit_Price__c ){
        li.Unit_Price__c = li.Merchandise__r.Price__c;
        }
    }
    update openLineItems;
}

 

Error: Compile Error: Didn't understand relationship 'Merchandise__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 4 column 9

 

Есть тема(topic): http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/apex/message-id/68444/print-single-message/false/page/1

 

Однако я не совсем понял как ее решить(

I do not understand how to solve it(