• LBS
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 22
    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?
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>
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
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


 
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
 
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
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
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
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
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