• LBS
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 17
    Replies
I have created a 30 day Sales Cloud lightning professional edition from this link. Then I wanted to create a Sandbox and try out some Apex codes. However I was able to create the sandbox, but can't activate it. Is that because of the trial version? If not how can i try out some apex features on a trial version?
  • July 12, 2018
  • Like
  • 0
I have below VF code to display LDS toast alert based on the showSuccess values of the controller. How can i auto-hide this panel after say 3 seconds. I'm looking for a solution something like .delay(3000).fadeOut() in jquery which can use for ​ tags 
<apex:outputPanel id="serverSuccessId" rendered="{!showSuccess}">
            <div id="serverValSuccessId">
                <div class="slds-notify_container">
                    <div class="slds-notify_container slds-is-relative">
                        <div class="slds-notify slds-notify_toast slds-theme_success" role="alert">
                          <span class="slds-assistive-text">success</span>
                          <span class="slds-icon_container slds-icon-utility-info slds-m-right_small slds-no-flex slds-align-top" title="Description of icon when needed">
                            <svg class="slds-icon slds-icon_small" aria-hidden="true">
                                <use xmlns:xlink="http://www.w3.org/1999/xlink" 
                                    xlink:href="/apexpages/slds/latest/assets/icons/utility-sprite/svg/symbols.svg#info">
                                </use>
                            </svg>
                          </span>
                          <div class="slds-notify__content">
                            <h2 class="slds-text-heading_small">Your request successfully submitted!</h2>
                          </div>
                          <button class="slds-button slds-button_icon slds-notify__close slds-button_icon-inverse" title="Close" onClick="hideNotification(); return false;">
                            <svg class="slds-button__icon slds-button__icon_large" aria-hidden="true">
                              <use xmlns:xlink="http://www.w3.org/1999/xlink" 
                                    xlink:href="/apexpages/slds/latest//assets/icons/utility-sprite/svg/symbols.svg#close">
                                </use>
                            </svg>
                            <span class="slds-assistive-text">Close</span>
                          </button>
                        </div>
                      </div>
                  </div>
            </div>    
        </apex:outputPanel>
  • February 14, 2018
  • Like
  • 0
I have sort of a strange issue. I have a VF email template which related to Case and recipient type is Contact. Whenever i run this for community user, I'm getting above error, while it perfectly works when I run the code in developer console - anonymous, system admin context. So when I remove the {RelatedTo.casenumber} it works well for community user as well. Field permission for Case object + casenumber field is read only for community user. Here is the email template
<messaging:emailTemplate subject="Subject" recipientType="Contact" relatedToType="Case">
    <messaging:htmlEmailBody >
        <html>
            <head>
              <STYLE type="text/css">
                  body {font-family: arial; color: #000;}
              </STYLE>
            </head>
            <body contenteditable="true">

                <apex:image id="dme_logo" value="sample" />

                <br/>
                <p style="color: #000;">Dear {!recipient.Name}</p>

                <p style="color: #000;">Reference number {!relatedTo.casenumber} </p>              
                <p style="color: #000;">Thanks,<br/>
                USER
                </p>

            </body>
        </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>
And the code,
EmailTemplate template = new EmailTemplate();
template = [Select id, name from EmailTemplate where name = 'Template name'];


List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setTemplateID(template.Id); 
mail.setTargetObjectId('0037A00000LAdS7');
mail.setSaveAsActivity(false);
mail.setWhatId('5007A000003sQN4QAM');    
mail.setBccSender(false);
mail.setUseSignature(false);
Messaging.sendEmail(mails);
​What can go wrong here guys?
  • June 05, 2017
  • Like
  • 0
I'm using DataTables in a VF page together with LDS. I basically loads some data to the table and there are check boxes for each and every row of data. So based on the user selection they should be able to delete selected rows(recods). Here is my JS code to get the selected records.
function getSelectedDataRowValues(tableId){

                var compTable = this[tableId.replace(/\-/g, '_')];
                alert(compTable);

                var dataRowNodes = compTable.rows().nodes();
                var dataRowValues = compTable.rows().data();

                var selectedDataRowValues = new Array();

                for(var i=0; i<dataRowNodes.length; i++){
                    var checkbox = j$(dataRowNodes[i].children[0].children[0]).find('input');
                    if (checkbox.prop('checked')){
                        selectedDataRowValues.push(dataRowValues[i]);
                    }
                }

                return selectedDataRowValues;
            }

But every time I run the code I keep getting following error.
Uncaught TypeError: compTable.rows is not a function
But when I used compTable.rows there were no issues. I'm using the latest DataTable version though. Here is my header though:
 
<apex:stylesheet value="{!URLFOR($Resource.DataTables, 'DataTables-1.10.13/media/css/jquery.dataTables.min.css')}"/>
<script src="{!URLFOR($Resource.DataTables, 'DataTables-1.10.13/media/js/jquery.dataTables.min.js')}"/>

What could go wrong here? Any suggestions? Or else is there any way to capture selected rows and process with them?

Thanks
  • March 16, 2017
  • Like
  • 0
Hi There,
I'm currently developing a VF page with LDS. together with Modals. My objective is to load the Modal when a button is clicked. The issue I have is every time the button is clicked, it opens up the Modal. But sooner it will refresh the page and closes the modal. Here is the code:

VF Page for Modal
<div id="loadUnameConfirmationModal" role="dialog" tabindex="-1" aria-labelledby="header43" class="slds-modal" area-hidden="false">
                <div class="slds-modal__container">
                    <div class="slds-modal__header">
                        <button onClick="hideUnameValidationModal();" class="slds-button slds-modal__close slds-button--icon-inverse" title="Close">
                            <svg class="slds-button__icon slds-button__icon--large" aria-hidden="true">
                                <use xlink:href="{!URLFOR($Resource.SDLS203,'/assets/icons/utility-sprite/svg/symbols.svg#close')}"></use>                                    
                            </svg>
                            <span class="slds-assistive-text">Close</span>
                        </button>
                        <h2 id="header43" class="slds-text-heading--medium">Connect To Salesforce Org</h2>
                    </div>
                <div class="slds-modal__content slds-p-around--medium">
                    <div class="slds-form-element__row"> 
                            <div class="slds-form-element"> 
                                <div name="username_lbl" Class="slds-form-element__label slds-size--1-of-4">Enter Username</div>                                    
                                <div class="slds-form-element__control">
                                    <input type="text" id="uName_txt" class="slds-input" placeholder="Username" />
                                </div>
                            </div>                                
                        </div>

                </div>
                <div class="slds-modal__footer">
                    <button class="slds-button slds-button--neutral" onClick="hideEnterDataModal();">Cancel</button>                        
                    <button class="slds-button slds-button--brand" onClick="showEnterDataModal();">Proceed</button>
                </div>
             </div>
          </div> 
          <div id="modalBackDrop" class="slds-backdrop"></div>
Here's the Button to call the Modal
 
<apex:commandButton id="selectDeferentloginbutton1" styleclass="slds-button slds-button--brand" value="Open Modal" onClick="showUnameValidationModal();"/>
And Here's the JS function to Load the Modal
 
function showUnameValidationModal(){                
                    j$('#loadUnameConfirmationModal').addClass('slds-fade-in-open'); 
                    j$('#modalBackDrop').addClass('slds-backdrop--open');

}

Please help to resolve the issue
Thanks, Mudi


 
  • March 08, 2017
  • Like
  • 0
Hi There,

I'm integerating two salesforce instences via metadata api with access token, with reference to following github project.
https://github.com/financialforcedev/apex-mdapi

So i updated the createService() code as follows to retrieve the acess token as the session ID. But ended up getting mentioned error. Can someone suggest me a workaround for this?
MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader = new MetadataService.SessionHeader_element();

//service.SessionHeader.sessionId = UserInfo.getSessionId();  
service.SessionHeader.sessionId = clientAccessToken; 
        
//I tried setting following as the endpoint_x. But was getting separate error
//service.endpoint_x = 'https://login.salesforce.com';
Thanks

 
  • February 27, 2017
  • Like
  • 0
Hi There,

Can we retrieve Metadata like apex classes, VF pages, WF rules rtc... from different org via rest api while I have the access token to that Org? 

BR,
Mudi
  • February 20, 2017
  • Like
  • 0
Hi There,

With referred to following blog I'm trying to integrate 2 salesforce Orgs. It follows the token requests with the token url. I have created connected Apps on the target env and remote access settings on the source org as suggested.
https://developer.salesforce.com/forums?id=906F00000009ARWIA2

I have created a VF page with a button and in the controller itself i have defined usernames, passwords, clientId/secrets to start the process. I.m getting no errors but it doesn't return the Access URL. Alaways have Null in the debug log. What could possibly go wrong? Something related to connected App settings?

Thanks,
Mudi
  • February 20, 2017
  • Like
  • 0
Hi There,

We have a business process to execute batch inserts/updates and Searches. Here is the scenario, We have a community Portal where external users will select List of records (custom records) based on a certain logic. This list may have up to 100-500 records.
And based on their selection, we have to process them. Like create Accounts, Contacts and create set of Custom records, send email alerts etc.. + Searches. This process is significantly heavy. And after inserting some of above custom records, there are triggers + Apex classes to run too. This will simply exceeds most of the governor limits.
Apparently this community was in a Client side application previously, where we used SOAP API to handle the Process. In that way we didn't have to bother about governor limits.
So I seek the help from yours to understand the best option to follow to implement this. Few options we are considering right now is,
Using Batch Apex
Using BulkTK - BulkTK
Using @future
Use Apex REST?
Appreciate your help here to understand the best possible approach. Or else please share your thoughts

Many Thanks, Lahiru
  • September 01, 2016
  • Like
  • 1
Hi There,
I'm using enterprise wsdl in .Net application to run sfdc webservices. Recently when I try to run the application I keep getting following error. Any idea how to avoid the issue?

System.Web.Services.Protocols.SoapException: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

I couldn't find a place to change the API version before generate Enterprise WDSL to use as web reference. So from where shall I change the API version to avoid this issue? Or else is there any workaround to avoid this issue. 

Thanks, Lahiru
  • January 20, 2016
  • Like
  • 0
Hi There,

I've been successfully using integrations to the SFDC using c# solution. So far I added the web reference and used it without any issues. But then I started add the Service Refference, by downloading the enteprise wsdl to local and used by Add Service Reference option. And I was reffering to following article (https://developer.salesforce.com/docs/atlas.en-us.salesforce_developer_environment_dotnet_tipsheet.meta/salesforce_developer_environment_dotnet_tipsheet/salesforce_developer_environment_verify_dotnet_wsdl.htm).
I was able to run the login function, but there I was unable set the serverUrl as I was unable to find the Url property on my SoalpClient. I think Becaues of that when it tries to SOQL query, it retuns following Error message. 
"UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService"

So when I was using web reference I was successfully able to create the sforcebinding and set the ServerUrl to the property I have in sforcebinding. Really Appriciate Your Help Here

Here is my code,

using SFServices.SFDC_FSb_9_23;

namespace SFServices
{
    class SFServiceClient
    {               
        private static SoapClient SFDC_FSb_9_23Binding;
        private static LoginResult CurrentLoginResult;   

        private bool SFLogin()
        {
            SFDC_FSb_9_23Binding = new SoapClient();  
            
            string UserName = "usename@domain.com.fsandbox";
            string Password = "passwordwithtoken";        
            
            try
            {
                CurrentLoginResult = SFDC_FSb_9_23Binding.login(null, UserName, Password);   
            }
            catch (System.Web.Services.Protocols.SoapException ex)
            {
                throw new Exception("Login Error: Please contact Technical Team for more details - "+ex);
                //return false;
            }
            if (CurrentLoginResult.passwordExpired)
            {
                throw new Exception("Password Expired: Please contact Technical Team for more details");
                //return false;
            }
            else
            {    

                //HOW CAN I SET THE ServerUrl. AND I THINK THE ISSUE IS HERE

                return true;                
            }
        }

-------------------------------------------------------------------------------------------------------------------------------------------
public bool sampleMethod(string field)
        {
            try
            {           
                if (SFLogin())
                {                    
                    String Query_1 = "SELECT Name, Id, FROM ACCOUNT WHERE custom_field__c='" + field + "'";
                    QueryResult qr = new QueryResult();                    
                    SFDC_FSb_9_23Binding.query(null, null, null, null, Query_1, out qr); // ISSUE COMES FROM HERE
                }
            }
        }  

Thanks,
Mudi
 
  • September 23, 2015
  • Like
  • 1
Hi There,

I have two objects (say obj1__c and obj2__c) with identical fields in both objects. Is there any code best practice that can be used to populate these fields from a record from obj1__c (rec1) to other (rec2 from obj2__c)? 

Thanks,
LBS
  • July 06, 2015
  • Like
  • 0

Hi There,

We have started using Git and Bitbucket as our version controling system. Also we are using Egit plugin as the GUI for git. We created a team in bitbucket, added our developers in to it and start working on it. 
So using eclipse ide I have created a force.com project, added necesary meta data and commited and pushed the project to bitbucket. And my team members were succesfully imported the same project in to their workspace.

And the issue came when one of the team members wanted add a brand new class in to the their local project. When he tries to do that it simply requires credentials to add the class to the project. And it requires my credentials, he couldnt do that using his salesforce credentials. How to avoid these types of issues in IDE? Are there any best practice to follow? Because I simply can not give away my credentiols to team members to add new codes. 

Thanks,
Mudi

  • May 28, 2015
  • Like
  • 0
Hi There,

Im a newbie using GIT and just tried to use the GIT as our version control system. I went through following dream force tutorial by John Stevenson. (https://www.youtube.com/watch?v=9P6ti5zQvRQ)

I was able to create the GIT account and tried to unpack the Package that i have created on one of my sandboxes. Steps I followed was,
1. Add Force exe (from Force.com CLI for Windows) file in to the GITHub -> myrepository folder
2. After Force Login, I Tried to execute the following command to unpack the Package
(force fetch -t=package -n=packagename -unpack)
3. Nothing happened and I kept getting the message 'Gonna do this again'

Please let me know if something wrong with this steps? Is this the correct way to do version controling even for Apex classes, triggers as well?
Also can someone suggest more tutorials/blogs that I can refer to? 
  • April 15, 2015
  • Like
  • 1
Hi All,

We have custom object (cusobj__c) associated with Activities (Tasks). Recently we got a use case to create a Task view including fields in the cusobj__c. We can not do it using the option create new view under activities as cusobj__c fields can not be reffered from task level (Related to relationship is not available)

Can we create a visualforce page to overcome this and add as a view once user goes to the Activity tab? Or else is there any feasible solution to overcome this

Thanks a lot

Mudi
  • October 13, 2014
  • Like
  • 0
Hi All,

We are in the process of customizing the community welcome email. So im generating the welcome email via a trigger in user object after insert event. So how we can generate/build the custom Community_Url field. Am replicating the following email btw

Hi {!Receiving_User.FirstName},

Welcome to {!Community_Name}! To get started, go to {!Community_Url}

Thanks,
{!Organization.Name}

Thanks a lot for a help
  • September 25, 2014
  • Like
  • 0
Hi There,

We have implemented a community potral in our SF org. So whenever a community user is created, a standard notification email will be sent out. Actually that was based on a template.

Recently we have a request from our business users to add CC to this email alert. The CC fields will be based on a custom field on a custom record. Is there any way that we can do that (using the standard process)?

I hope we should be able to do that by writing a simple trigger on after insert event for user for community profile. But the concern is can we enable the create password feature in the first time they go to the community just like the standard feature?

Thanks
  • September 22, 2014
  • Like
  • 0
Hi There,

We have implemented a community potral in our SF org. So whenever a community user is created, a standard notification email will be sent out. Actually that was based on a template.

Recently we have a request from our business users to add CC to this email alert. The CC fiels will be based on a custom field on a custom record. Is there any way that we can do that (using the standard process)?

I hope we should be able to do that by writing a simple trigger on after insert event for user for community profile. But the concern is can we enable the create password feature in the first time they go to the community just like the standard feature?

Thanks
  • September 17, 2014
  • Like
  • 0
Hi There,

Im recently developing a form using VF pages and with tabbed interface. I noticed that eventhough I have included the SwitchType property to client on my tabpanel, i couldn't navigate among tabs.
But when i set either the sidebar or showHeader properties to false on the Apex:page, I was able to navigate among tabs. It was realy frustating and not what i wanted at all. Please kindly help me on this. Here is my VF code.

<apex:page standardController="Custom_object__c" showHeader="true" sidebar="true" id="thePage" tabStyle="Custom_object__c">
<apex:sectionHeader title="Test" subtitle="Test"/>
    <style>
      .activeTab {background-color: #236FBD; color:white;
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black;
         background-image:none}
   </style>

      <apex:tabPanel switchType="client" id="TabPanel" selectedTab="tabMain" inactiveTabClass="inactiveTab" activeTabClass="activeTab"> 
      <apex:tab label="Main" name="MainTab" id="tabMain">       
         <apex:form >
             <apex:pageBlock >
                 <Apex:pageBlockSection title="Main Details" columns="2">
                     <apex:inputField value="{!Custom_object__c.name}"/>
                     <apex:inputField value="{!Custom_object__c.Buyer__c}"/>            
                 </Apex:pageBlockSection>
                 <apex:pageBlockButtons >
                    <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>           
             </apex:pageBlock>        
         </apex:form> 
                
      </apex:tab>    
      <apex:tab label="tab 2" name="Tab2" id="tab2">    
       <apex:form >
             <apex:pageBlock title="Tab 2 deytails">
                 <Apex:pageBlockSection title="Details" columns="2">
                     <apex:inputField value="{!Custom_object__c.Bank_Account_Name__c}"/>
                     <apex:inputField value="{!Custom_object__c.Bank_Account_Number__c}"/>               
                 </Apex:pageBlockSection>
                 <apex:pageBlockButtons >
                    <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>           
             </apex:pageBlock>         
         </apex:form> 
      </apex:tab>    
   </apex:tabPanel>
</apex:page>
  • January 22, 2014
  • Like
  • 0

Hi All,

In our instance we have implemented a partner portal for portal users to access the case management process. Here We have 2 case form layouts.
Standard_Layout for standard users, with System Administrator profile
PP_Layout for Portal users with PP profile

We have a Record type as well called PP_RT with a support process say PP_SP. In this PP_SP we made sure to remove some case status picklist items. Also in the PP_RT, we removed some items from available picklists. After all this we assigned PP_Layout for PP profile with PP_RT record type. And for the system administrator. we assigned Standard_Layout with master record type.

Once the partner user logs in the Portal, they are able to create a case with restricted picklist items including Status as well. When we access the same case using System administrator profile internaly, the Standard_layout display for us. But the issue is we still getting the restricted picklists as in portal users. And vise versa. Meaning once we create a case internally, the portal users will see the unrestricted picklists when they access the same case in partner portal.

Is there any way to resolve this issue? 

 

Thanks

  • October 13, 2013
  • Like
  • 0
Hi There,

We have a business process to execute batch inserts/updates and Searches. Here is the scenario, We have a community Portal where external users will select List of records (custom records) based on a certain logic. This list may have up to 100-500 records.
And based on their selection, we have to process them. Like create Accounts, Contacts and create set of Custom records, send email alerts etc.. + Searches. This process is significantly heavy. And after inserting some of above custom records, there are triggers + Apex classes to run too. This will simply exceeds most of the governor limits.
Apparently this community was in a Client side application previously, where we used SOAP API to handle the Process. In that way we didn't have to bother about governor limits.
So I seek the help from yours to understand the best option to follow to implement this. Few options we are considering right now is,
Using Batch Apex
Using BulkTK - BulkTK
Using @future
Use Apex REST?
Appreciate your help here to understand the best possible approach. Or else please share your thoughts

Many Thanks, Lahiru
  • September 01, 2016
  • Like
  • 1
Hi There,

I've been successfully using integrations to the SFDC using c# solution. So far I added the web reference and used it without any issues. But then I started add the Service Refference, by downloading the enteprise wsdl to local and used by Add Service Reference option. And I was reffering to following article (https://developer.salesforce.com/docs/atlas.en-us.salesforce_developer_environment_dotnet_tipsheet.meta/salesforce_developer_environment_dotnet_tipsheet/salesforce_developer_environment_verify_dotnet_wsdl.htm).
I was able to run the login function, but there I was unable set the serverUrl as I was unable to find the Url property on my SoalpClient. I think Becaues of that when it tries to SOQL query, it retuns following Error message. 
"UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService"

So when I was using web reference I was successfully able to create the sforcebinding and set the ServerUrl to the property I have in sforcebinding. Really Appriciate Your Help Here

Here is my code,

using SFServices.SFDC_FSb_9_23;

namespace SFServices
{
    class SFServiceClient
    {               
        private static SoapClient SFDC_FSb_9_23Binding;
        private static LoginResult CurrentLoginResult;   

        private bool SFLogin()
        {
            SFDC_FSb_9_23Binding = new SoapClient();  
            
            string UserName = "usename@domain.com.fsandbox";
            string Password = "passwordwithtoken";        
            
            try
            {
                CurrentLoginResult = SFDC_FSb_9_23Binding.login(null, UserName, Password);   
            }
            catch (System.Web.Services.Protocols.SoapException ex)
            {
                throw new Exception("Login Error: Please contact Technical Team for more details - "+ex);
                //return false;
            }
            if (CurrentLoginResult.passwordExpired)
            {
                throw new Exception("Password Expired: Please contact Technical Team for more details");
                //return false;
            }
            else
            {    

                //HOW CAN I SET THE ServerUrl. AND I THINK THE ISSUE IS HERE

                return true;                
            }
        }

-------------------------------------------------------------------------------------------------------------------------------------------
public bool sampleMethod(string field)
        {
            try
            {           
                if (SFLogin())
                {                    
                    String Query_1 = "SELECT Name, Id, FROM ACCOUNT WHERE custom_field__c='" + field + "'";
                    QueryResult qr = new QueryResult();                    
                    SFDC_FSb_9_23Binding.query(null, null, null, null, Query_1, out qr); // ISSUE COMES FROM HERE
                }
            }
        }  

Thanks,
Mudi
 
  • September 23, 2015
  • Like
  • 1
Hi There,

Im a newbie using GIT and just tried to use the GIT as our version control system. I went through following dream force tutorial by John Stevenson. (https://www.youtube.com/watch?v=9P6ti5zQvRQ)

I was able to create the GIT account and tried to unpack the Package that i have created on one of my sandboxes. Steps I followed was,
1. Add Force exe (from Force.com CLI for Windows) file in to the GITHub -> myrepository folder
2. After Force Login, I Tried to execute the following command to unpack the Package
(force fetch -t=package -n=packagename -unpack)
3. Nothing happened and I kept getting the message 'Gonna do this again'

Please let me know if something wrong with this steps? Is this the correct way to do version controling even for Apex classes, triggers as well?
Also can someone suggest more tutorials/blogs that I can refer to? 
  • April 15, 2015
  • Like
  • 1
I have created a 30 day Sales Cloud lightning professional edition from this link. Then I wanted to create a Sandbox and try out some Apex codes. However I was able to create the sandbox, but can't activate it. Is that because of the trial version? If not how can i try out some apex features on a trial version?
  • July 12, 2018
  • Like
  • 0
I have below VF code to display LDS toast alert based on the showSuccess values of the controller. How can i auto-hide this panel after say 3 seconds. I'm looking for a solution something like .delay(3000).fadeOut() in jquery which can use for ​ tags 
<apex:outputPanel id="serverSuccessId" rendered="{!showSuccess}">
            <div id="serverValSuccessId">
                <div class="slds-notify_container">
                    <div class="slds-notify_container slds-is-relative">
                        <div class="slds-notify slds-notify_toast slds-theme_success" role="alert">
                          <span class="slds-assistive-text">success</span>
                          <span class="slds-icon_container slds-icon-utility-info slds-m-right_small slds-no-flex slds-align-top" title="Description of icon when needed">
                            <svg class="slds-icon slds-icon_small" aria-hidden="true">
                                <use xmlns:xlink="http://www.w3.org/1999/xlink" 
                                    xlink:href="/apexpages/slds/latest/assets/icons/utility-sprite/svg/symbols.svg#info">
                                </use>
                            </svg>
                          </span>
                          <div class="slds-notify__content">
                            <h2 class="slds-text-heading_small">Your request successfully submitted!</h2>
                          </div>
                          <button class="slds-button slds-button_icon slds-notify__close slds-button_icon-inverse" title="Close" onClick="hideNotification(); return false;">
                            <svg class="slds-button__icon slds-button__icon_large" aria-hidden="true">
                              <use xmlns:xlink="http://www.w3.org/1999/xlink" 
                                    xlink:href="/apexpages/slds/latest//assets/icons/utility-sprite/svg/symbols.svg#close">
                                </use>
                            </svg>
                            <span class="slds-assistive-text">Close</span>
                          </button>
                        </div>
                      </div>
                  </div>
            </div>    
        </apex:outputPanel>
  • February 14, 2018
  • Like
  • 0
I'm using DataTables in a VF page together with LDS. I basically loads some data to the table and there are check boxes for each and every row of data. So based on the user selection they should be able to delete selected rows(recods). Here is my JS code to get the selected records.
function getSelectedDataRowValues(tableId){

                var compTable = this[tableId.replace(/\-/g, '_')];
                alert(compTable);

                var dataRowNodes = compTable.rows().nodes();
                var dataRowValues = compTable.rows().data();

                var selectedDataRowValues = new Array();

                for(var i=0; i<dataRowNodes.length; i++){
                    var checkbox = j$(dataRowNodes[i].children[0].children[0]).find('input');
                    if (checkbox.prop('checked')){
                        selectedDataRowValues.push(dataRowValues[i]);
                    }
                }

                return selectedDataRowValues;
            }

But every time I run the code I keep getting following error.
Uncaught TypeError: compTable.rows is not a function
But when I used compTable.rows there were no issues. I'm using the latest DataTable version though. Here is my header though:
 
<apex:stylesheet value="{!URLFOR($Resource.DataTables, 'DataTables-1.10.13/media/css/jquery.dataTables.min.css')}"/>
<script src="{!URLFOR($Resource.DataTables, 'DataTables-1.10.13/media/js/jquery.dataTables.min.js')}"/>

What could go wrong here? Any suggestions? Or else is there any way to capture selected rows and process with them?

Thanks
  • March 16, 2017
  • Like
  • 0
Hi There,
I'm currently developing a VF page with LDS. together with Modals. My objective is to load the Modal when a button is clicked. The issue I have is every time the button is clicked, it opens up the Modal. But sooner it will refresh the page and closes the modal. Here is the code:

VF Page for Modal
<div id="loadUnameConfirmationModal" role="dialog" tabindex="-1" aria-labelledby="header43" class="slds-modal" area-hidden="false">
                <div class="slds-modal__container">
                    <div class="slds-modal__header">
                        <button onClick="hideUnameValidationModal();" class="slds-button slds-modal__close slds-button--icon-inverse" title="Close">
                            <svg class="slds-button__icon slds-button__icon--large" aria-hidden="true">
                                <use xlink:href="{!URLFOR($Resource.SDLS203,'/assets/icons/utility-sprite/svg/symbols.svg#close')}"></use>                                    
                            </svg>
                            <span class="slds-assistive-text">Close</span>
                        </button>
                        <h2 id="header43" class="slds-text-heading--medium">Connect To Salesforce Org</h2>
                    </div>
                <div class="slds-modal__content slds-p-around--medium">
                    <div class="slds-form-element__row"> 
                            <div class="slds-form-element"> 
                                <div name="username_lbl" Class="slds-form-element__label slds-size--1-of-4">Enter Username</div>                                    
                                <div class="slds-form-element__control">
                                    <input type="text" id="uName_txt" class="slds-input" placeholder="Username" />
                                </div>
                            </div>                                
                        </div>

                </div>
                <div class="slds-modal__footer">
                    <button class="slds-button slds-button--neutral" onClick="hideEnterDataModal();">Cancel</button>                        
                    <button class="slds-button slds-button--brand" onClick="showEnterDataModal();">Proceed</button>
                </div>
             </div>
          </div> 
          <div id="modalBackDrop" class="slds-backdrop"></div>
Here's the Button to call the Modal
 
<apex:commandButton id="selectDeferentloginbutton1" styleclass="slds-button slds-button--brand" value="Open Modal" onClick="showUnameValidationModal();"/>
And Here's the JS function to Load the Modal
 
function showUnameValidationModal(){                
                    j$('#loadUnameConfirmationModal').addClass('slds-fade-in-open'); 
                    j$('#modalBackDrop').addClass('slds-backdrop--open');

}

Please help to resolve the issue
Thanks, Mudi


 
  • March 08, 2017
  • Like
  • 0
I have these two apex triggers that I need help writing test for. As a newbie to salesforce devlopment, it took some time to finally get these triggers working. Thanks for your help. - Wes
 
trigger IndvidualEngagementScore on EngagementContact__c(after insert, after update, after delete) {

    Contact objContact;
    String getAccountId;
    Decimal sumPoints = 0;
    Decimal countRecords = 0;

    //Set initial values based on current engagement record's contact and trigger action:
    if (Trigger.isDelete) {
        For(EngagementContact__c delEngagement: trigger.old) {
            objContact = [SELECT id, AccountID FROM Contact WHERE id =: delEngagement.Contact__c];
            getAccountId = objContact.AccountId;
            if (delEngagement.ParticipationPoints__c == NULL) {
                sumPoints = 0;
                countRecords = 0;
            }
            Else {
                sumPoints = sumPoints - delEngagement.ParticipationPoints__c;
                countRecords = countRecords - 1;
            }
        }

    }
    Else {
        For(EngagementContact__c objEngagement: trigger.new) {
            objContact = [SELECT id, AccountID FROM Contact WHERE id =: objEngagement.Contact__c];
            getAccountId = objContact.AccountId;
            sumPoints = sumPoints + objEngagement.ParticipationPoints__c;
            countRecords = countRecords + 1;
            if (Trigger.isUpdate) {
                For(EngagementContact__c oldEngagement: trigger.old) {

                    if (oldEngagement.ParticipationPoints__c == NULL) {
                        sumPoints = 0;
                        countRecords = 0;
                    }
                    Else {
                        sumPoints = sumPoints - oldEngagement.ParticipationPoints__c;
                        countRecords = countRecords - 1;
                    }


                }
            }
        }
    }

    //Get other contacts related to same account and sum their engagement points:   
    Account objAccount = [SELECT id FROM Account WHERE id =: getAccountId];
    List < Contact > contactList = [SELECT id, EngagementPoints__c, EngagementRecords__c FROM Contact WHERE AccountId =: objAccount.Id];
    For(Contact i: contactList) {
        sumPoints = sumPoints + i.EngagementPoints__c;
        countRecords = countRecords + i.EngagementRecords__c;
    }

    //Update the account's engagement score and commit change:
    objAccount.IndividualEngagementScore__c = sumPoints;
    objAccount.IndividualEngagementRecords__c = countRecords;
    Update objAccount;

}

trigger IndividualEngagmentOrgRecalc on Contact(After update, After delete) {


    String getOldAccountId;
    String getNewAccountID;
    Decimal sumPoints = 0;
    Decimal countRecords = 0;

    For(Contact objOldContact: trigger.old) {
        //Get other contacts related to same OLD account and sum their engagement points:   
        Account objOldAccount = [SELECT id FROM Account WHERE id =: objOldContact.AccountID];
        List < Contact > contactOldList = [SELECT id, EngagementPoints__c, EngagementRecords__c FROM Contact WHERE AccountId =: objOldAccount.Id];
        For(Contact i: contactOldList) {
            sumPoints = sumPoints + i.EngagementPoints__c;
            countRecords = countRecords + i.EngagementRecords__c;
        }
        //Update the OLD account's engagement score and commit change:
        objOldAccount.IndividualEngagementScore__c = sumPoints;
        objOldAccount.IndividualEngagementRecords__c = countRecords;
        Update objOldAccount;
    }


    //Reset initial values
    sumPoints = 0;
    countRecords = 0;


    if (Trigger.isDelete) {}
    ELSE {
        For(Contact objNewContact: trigger.New) {
            //Get other contacts related to same OLD account and sum their engagement points:   
            Account objNewAccount = [SELECT id FROM Account WHERE id =: objNewContact.AccountId];
            List < Contact > contactNewList = [SELECT id, EngagementPoints__c, EngagementRecords__c FROM Contact WHERE AccountId =: objNewAccount.Id];
            For(Contact i: contactNewList) {
                sumPoints = sumPoints + i.EngagementPoints__c;
                countRecords = countRecords + i.EngagementRecords__c;
            }

            //Update the OLD account's engagement score and commit change:
            objNewAccount.IndividualEngagementScore__c = sumPoints;
            objNewAccount.IndividualEngagementRecords__c = countRecords;
            Update objNewAccount;
        }
    }
}


 
hi

 can you  suggest me complete process for create a package?


Thanks
 
  • February 20, 2017
  • Like
  • 0
Hi There,

With referred to following blog I'm trying to integrate 2 salesforce Orgs. It follows the token requests with the token url. I have created connected Apps on the target env and remote access settings on the source org as suggested.
https://developer.salesforce.com/forums?id=906F00000009ARWIA2

I have created a VF page with a button and in the controller itself i have defined usernames, passwords, clientId/secrets to start the process. I.m getting no errors but it doesn't return the Access URL. Alaways have Null in the debug log. What could possibly go wrong? Something related to connected App settings?

Thanks,
Mudi
  • February 20, 2017
  • Like
  • 0
Trying to find a way to mange workflow rules. Mainly looking for programatically activate a worflow rules and add new outbound message action into a workflow rules.

While we are currently using REST api to interact with Salesfoce for data (e.g lead, account etc ...), REST api doesn`t seems to have a way to manage workflow rules, and only metadat api can manage workflow rules.

My question is, if we already have the access token from REST API, can we use it on Metadata API calls (SOAP api i beleve)
 
Hello All,

I am trying to integrate two instance via metadata api.  I have used oauth to get access token and passed it to metadata api session.  When i called the method then this error came out.  Can anyone please suggest some workaround to use another salesforce instance session in seperate salesforce instance metadata api codings.
 
MetadataService.MetadataPort service1 = new MetadataService.MetadataPort();
        service1.SessionHeader = new MetadataService.SessionHeader_element();
        service1.SessionHeader.sessionId = access_token;

Thanks.
Hi There,
I'm using enterprise wsdl in .Net application to run sfdc webservices. Recently when I try to run the application I keep getting following error. Any idea how to avoid the issue?

System.Web.Services.Protocols.SoapException: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

I couldn't find a place to change the API version before generate Enterprise WDSL to use as web reference. So from where shall I change the API version to avoid this issue? Or else is there any workaround to avoid this issue. 

Thanks, Lahiru
  • January 20, 2016
  • Like
  • 0
Hi All,

We have custom object (cusobj__c) associated with Activities (Tasks). Recently we got a use case to create a Task view including fields in the cusobj__c. We can not do it using the option create new view under activities as cusobj__c fields can not be reffered from task level (Related to relationship is not available)

Can we create a visualforce page to overcome this and add as a view once user goes to the Activity tab? Or else is there any feasible solution to overcome this

Thanks a lot

Mudi
  • October 13, 2014
  • Like
  • 0
Hi All,

We are in the process of customizing the community welcome email. So im generating the welcome email via a trigger in user object after insert event. So how we can generate/build the custom Community_Url field. Am replicating the following email btw

Hi {!Receiving_User.FirstName},

Welcome to {!Community_Name}! To get started, go to {!Community_Url}

Thanks,
{!Organization.Name}

Thanks a lot for a help
  • September 25, 2014
  • Like
  • 0
I have created a changeset that contains only an edit to a URL name in a tab. I am getting errors deploying it in production for test classes which are not even in my changeset. Kindly help.
Greetings...

I have had great success in using .net and the associated API Enterprise generated WSDL and Web Reference for about a year.  I've also used the API in the Sandbox.  I hadn't made a change to the Sandbox or the Production for a couple of months.  Today I did the following in Firefox (I have had more success generating and downloading the WSDL in Firefox)

- Went to Settings/Develop/API/Generate Enterprise WSDL and clicked the GENERATE button to the right of "Generate Enterprise WSDL"
- The result in Firefox was not the normal formatted XML that I had seen in the past (perhaps the update to Firefox did this) What appeared was what looked like one big paragraph of sentences (no xml tags)
-  I right clicked in the white area of the page and "saved as"  test.wsdl
- When I opened test.wsdl, it looked like it alwas does...properly formed XML

Next in VS, I changed the Web Reference property to the Test.wsdl file name and Updated my Web Reference

======================================
Now the issue (finaly)
======================================

When I try to create an instance of SforceService like the code below:

                    SforceService sfService = new SforceService();

I get the following exception:

2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Name InvalidOperationException
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message Unable to generate a temporary class (result=1).
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0030: Cannot convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn[]' to 'Mozenda.Business.Salesforce.ListViewRecordColumn'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0030: Cannot convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn[]' to 'Mozenda.Business.Salesforce.ListViewRecordColumn'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0029: Cannot implicitly convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn' to 'Mozenda.Business.Salesforce.ListViewRecordColumn[]'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Message error CS0029: Cannot implicitly convert type 'Mozenda.Business.Salesforce.ListViewRecordColumn' to 'Mozenda.Business.Salesforce.ListViewRecordColumn[]'
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.Source System.Xml
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at Mozenda.Business.Salesforce.SforceService..ctor()
2014-09-11 16:35:30.000  Warning SalesforceClient.Connect Exception.Exception.StackTrace    at Mozenda.Business.SalesforceClient.SalesForceClient.Connect()


There is alot if information about "Unable to generate a temporary class (result=1)" doing a Google search, but nothing seems to apply.

- Has Salesforce changed how the Enterprise WSDL is created?

Thanks in advance!!

Russ






Hi All,

 

Without changing the template, is there any way that we can include case fields like case Subject, Case Number in to the Email Subject in 'Send an Email' option under Case? Also I need to do the same when we reply to a existing email. 

 

The reason Im not using an email template is that once we change the email template, it will delete the existing body and replace with the email template's body. That will confuse our customers.

So Is there any way that we can overcome this issue? 
Or else can I customize this?

 

Thanks

  • September 24, 2013
  • Like
  • 0