• Mustafa Jhabuawala
  • NEWBIE
  • 232 Points
  • Member since 2016
  • Independent Salesforce Consultant


  • Chatter
    Feed
  • 5
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 9
    Questions
  • 117
    Replies
User-added image
                                 <tbody>
                                    <apex:repeat value="{!SearchResult}" var="SearchProduct">
                                        <tr>
                                            <td><apex:inputCheckbox value="{!SearchProduct.Selected}"/></td>
                                            <td>{!SearchProduct.ArticleNumber}</td>
                                            <td>{!SearchProduct.ProductName}</td>
                                            <td>{!SearchProduct.PowerinKW}</td>
                                            <td>{!SearchProduct.Vacuuminmbar}</td>
                                            <td>{!SearchProduct.Airvolume}</td>
                                            <td>{!SearchProduct.FilterSize}</td>
                                            <td><button class="bsbtn bsbtn-xs" data-toggle="modal" data-
                                            target="#ProductInformation" data-dismiss="modal" type="button" 
                                   onclick="ProductInfoModal('{!SearchProduct.ProductDescription.Product2.Id}');">
                                           <span class="glyphicon glyphicon-question-sign"></span></button></td>
                                        </tr>
                                    </apex:repeat>
                                </tbody>

 
Conponent is
<aura:component >
    <ui:inputText label="name" aura:id="name" placeholder="Enter your name"/>
    <ui:outputText aura:id="nameoutput" value=""/>

    <ui:button aura:id="buttonid" label="Submit" press="{!c.getInput}"/>
</aura:component>
****client side controller is ***
({
    getinput : function(cmp , event) {
        var.fullname = cmp.find("name").get("v.value");
        var.outname = cmp.find("nameoutput");
        outname.set("v.value",fullname+"***");
    }
})

not working properly
error message is****
This page has an error. You might just need to refresh it. Component class instance initialization error [Cannot read property 'apply' of undefined] Failing descriptor: {markup://aura:application}
Hi everyone, How can I pass string to lightning search?
Is there a way similar to classic where we can pass a string instead of typing the search keyword? 
If there is any solution let me know. Our clients wants to do it in lightning instead of classic. 

Thank you.

Austin
hey there,
I've just stated using salesforce and apex and I'd like to have some help with my testing methods. If anyone can helpl plz i'd be gratefull !
Here's the visualforce page code  :

<apex:page controller="progress_bar">
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
   <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
 <apex:pageblock title="Feedbacks by Severity">
        <form>     
      <center>
             <br/> <br/> <br/> <br/>
                <div class="progress">
                    <div class="progress-bar progress-bar-striped progress-bar-success" role="progressbar" style="width:35%">
                        {!Normal} Normal
                    </div>
                   
                    <div class="progress-bar progress-bar-striped active progress-bar-warning" role="progressbar" style="width:20%">
                        {!Blocking} Blocking
                    </div>
                   
                    <div class="progress-bar progress-bar-striped progress-bar-danger" role="progressbar" style="width:20%">
                        {!Urgent} Urgent
                    </div>
                 </div>
          </center>
  </form>
     <style>
            .progress {
            color : white;
            font-weight : bold;
            font-size : 100%;
           
            }
     </style>
 </apex:pageblock>
</apex:page>


and the apex class used :

public class progress_statut {

    public integer getNew(){
        return [select count() from feedbacks__c where Feedback_statut__c='New'];
    }
  
 public integer getAssigned(){
        return [select count() from feedbacks__c where Feedback_statut__c='Assigned'];
    }
    public integer getAssignedEditor(){
        return [select count() from feedbacks__c where Feedback_statut__c='Assigned to Editor'];
    }
 public integer getInformationNeeded(){
        return [select count() from feedbacks__c where Feedback_statut__c='Information Needed'];
    }
 
    public integer getEffortEstimation(){
        return [select count() from feedbacks__c where Feedback_statut__c='Effort Estimation'];
    }
     public integer getwillnotfix(){
        return [select count() from feedbacks__c where Feedback_statut__c='Will not fix'];
    }
    public integer getresolved(){
        return [select count() from feedbacks__c where Feedback_statut__c='Resolved'];
    }
    public integer getdelivered(){
        return [select count() from feedbacks__c where Feedback_statut__c='Delivered'];
    }
    public integer getclosed(){
        return [select count() from feedbacks__c where Feedback_statut__c='Closed'];
    }
}


Thanks for the help in advance !!


 
I had deleted an object previously created and when i re-creating some of the dependencies, i have name conflict and system throws an error saying the dependency existing with the name.

how can delete the dependencies on the object while deleting the object 
Hi,

This was working perfectly fine from past so many months and suddenly 2 days back this started throwing an error while executing test classes.

Code to execute
List<Contact> listContact = ContactTestDataFactory.createContact(1, 'FirstName', 'LastName'); insert listContact;

ContactTestDataFactory Test Class -
//Create Contact object 
public static List<Contact> createContact(Integer no_of_contact,String FirstName, String LastName){ 

List<String> lstSalutation = new List<String>{'Mr.','Ms.','Mrs.','Miss.','Dr.','U.S. Senator','U.S. Representative','Governor','Governor’s Cabinet Secretaries','Attorney General','State Senator','State Representative','Judge','Mayor','Consul-General','Ambassador','Ambassador to the U.S.','President of a Country','Former President','Lady','Police Chief','Chief Marshal','Dean','Professor','Priest','Pastor','Monsignor','Cantor','Rabbi','Nun or Sister','Brother','Bishop','Cardinal','Swami'}; 

List<Contact> listContact= new List<Contact>(); Contact objCon = new Contact(); 

for(Integer i=0;i<no_of_contact ;i++){ 
objCon = new Contact(); 
objCon.FirstName= FirstName; 
objCon.LastName= LastName; 
objCon.Salutation= lstSalutation[i]; objCon.Giving_Status__c= 'Prospect'; objCon.npe01__Primary_Address_Type__c = 'Residence'; objCon.MailingStreet = 'test'+i; 
objCon.Street_2__c = 'test 2'+i; objCon.MailingState='test'+i; objCon.MailingCity='test'+i; objCon.MailingCountry='test'+i; 
objCon.Gender__c = 'Female'; 
objCon.FirstName= FirstName; if(i/2 == 0){ objCon.Gender__c= 'Male'; 
} 
else{ 
objCon.Gender__c= 'Female'; 
} 
objCon.Unique_ID__c = String.valueOf(i); listContact.add(objCon); 
} 
System.debug('listContact'+listContact); 
return listContact; 
}

ERROR thrown - 
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, npsp.TDTM_Contact: execution of AfterInsert

caused by: System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []

(npsp)






: []

Any help would be really really appreciated.

I checked other post from Stackexcahnge as well and tried work around but no luck yet.
Stack excahnge similar issue link - https://salesforce.stackexchange.com/questions/79799/how-to-debug-the-mysterious-duplicate-value-found-unknown-duplicates-value-o


--
Kind Regards
Mustafa
I am trying to call a Lightning Page from a quick action. Below are the details - 
  1. Created a quick action and refered a component
  2. #1 component contains a button click of which navigateURL is called
Component Code 
<aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,force:appHostable" >
    <header class="slds-modal__header">
        <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">Heading</h2>
    </header>
    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
        <p>You will navigated to XYZ Page. Do you want to proceed ? </p>
    </div>
    <footer class="slds-text-align_center">
        <lightning:button onclick="{!c.proceed}" class="slds-button_brand" >Yes</lightning:button>&nbsp;
        <lightning:button onclick="{!c.cancel}" class="slds-button_brand" >No</lightning:button>
    </footer>
</aura:component>
Controller.js
({
    proceed : function (component, event, helper) {
        var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({
            "url": 'https://devjuf--mjteam.lightning.force.com/one/one.app#/n/Some_Page?CampaignID=701W0000000WrbCIAS'
        });
        urlEvent.fire();
    },
    cancel : function(){
        $A.get("e.force:closeQuickAction").fire();
    }
})
Note  - For testing purpose I have hardocded the URL and ID.

The problem is when I try to pass the parameters through URL, page is getting re-directed to the correct tab but it doesn't show the label of tab.

User-added image

If I am not passing any parameter in that case it works fine. Check the screen shot'

User-added image

Any help on this would be really appreciated.

--
Regards
Mustafa
 
Hi #SalesforceOhana I need urgent help on this, I have gone through the salesforce documents which says that when locker service is activated you will not be able to access elements generated by other components which is far enough :) , but what I am trying to do is to access the element generated by same component but no luck :( when locker service is activated.

Below are the details - 

Lightning Application - LS_SampleA
<aura:application >
	<c:LS_SampleC></c:LS_SampleC>
</aura:application>

Lightning Component - LS_SampleC
<aura:component >
    <ltng:require scripts="/resource/jquery"/>
	<ui:outputText aura:id="trialField" class="trialField" value="Lightning Locker Service"/>
    <ui:button press="{!c.highlighter}" label="Color" />
</aura:component>
LS_SampleCController.js
({
	highlighter : function(component, event, helper) {
        debugger;
		$(".trialField").addClass("color");
	}
})

LS_SampleC.css
.THIS.color {
    background-color: #fdd987!important;
}

App Preview - 
User-added image

When user clicks on Color button, text gets colored. This is working only if locker service is deactivated.

When locker service is deactivated - 
User-added image

When locker service is activated - 
User-added image

Thanks in advance
 
What I wanted to do is I storing a PDF into attachments object through apex

Here is the apex code -
Blob body = Blob.valueOf('Some Text');
Attachment attach = new Attachment();
attach.Body = body;
attach.Name = 'Sample.pdf'; 
attach.IsPrivate = false;
attach.ParentId = '00641000004n7fEAAQ';
insert attach;

Now when I navigate to the object on which I have linked this attachment, click on the file it doesn't get loaded. Following error is displayed

User-added image

There is something wrong while inserting the record.

Can somebody help me.

Note - I need pdf file to be attached to the object

 
I have just started working on community sites.
 
I am working with Salesforce Tabs + Visualforce I have designed by login page and using the pre-built component named as SiteLogin which use SiteLoginController but when I try to enter username and password I am not able to log in.
 
I am facing this issue and not getting any proper documentation anywhere on this. Can anyone please let me know how to proceed further ? 
Hi All,

Please look into this, I am not able to call the jQuery datatable function. Below are the details - 

DatatableApp.app - 
<aura:application >
        <c:DatatableComponent />
</aura:application>

DatatableComponent.cmp -
<aura:component controller="DatatableController">
<!-- Static Resource details - jQuery js file --> (jQUerySource), jQuery Datatable file --> (jqueryDatatableJS) -->
	<ltng:require scripts="/resource/1466061468000/jQuerySource,/resource/1466061531000/jqueryDatatableJS" afterScriptsLoaded="{!c.jsLoaded}"/>
<!-- doInit method will call JS controller and then will get the details from Apex Controller and put in into the HTML using aura:iteration -->
  <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> 
              <table class="display" id="#sampleTable">
			<thead>
				<tr>
					<th>ID</th>
				</tr>
			</thead>
			<tbody>
				  <aura:iteration items="{!v.cases}" var="case">
         <tr><td>1</td><td>{!case.Id}</td></tr>
       </aura:iteration>
			</tbody>
		</table>
        </div>
        <div class="col-md-2"></div>
    </div>
 </aura:component>
DatatableComponentController.js - 
 
({
    jsLoaded: function(component, event, helper) {
        debugger;
        $('#sampleTable').DataTable();
    },
   doInit: function(component, event, helper) {    
      helper.getCaseList(component);   
   }
})
DatatableComponentHelper.js - 
({
    getCaseList: function(component) {
    var action = component.get("c.getCases");
    var self = this;
    action.setCallback(this, function(actionResult) {
        component.set("v.cases", actionResult.getReturnValue());            
    });
    $A.enqueueAction(action);
  }   
})
DatatableController.apxc - 
public class DatatableController {
   @AuraEnabled
   public static List<Case> getCases() {
       system.debug([SELECT Id FROM Case limit 10]);
       return [SELECT Id FROM Case limit 10];
   }   
}
On click of preview button. I am getting this error -

User-added image

I am using jquery data table (https://datatables.net/) here.

Need urgent help.

Thank you in advance.
 
Hi,

I want to update a field in my custom object, once any attachement for the record has been uploaded, I want to update a specific field of that custom object.

Note: I don't want to write a trigger on attachement, because it will be used at multiple places and I don't want to create miltiple calls on the trigger.

If anyone knows the solution of above problem please help or share your ideas

--
Thanks
Mustafa
Hi,

This was working perfectly fine from past so many months and suddenly 2 days back this started throwing an error while executing test classes.

Code to execute
List<Contact> listContact = ContactTestDataFactory.createContact(1, 'FirstName', 'LastName'); insert listContact;

ContactTestDataFactory Test Class -
//Create Contact object 
public static List<Contact> createContact(Integer no_of_contact,String FirstName, String LastName){ 

List<String> lstSalutation = new List<String>{'Mr.','Ms.','Mrs.','Miss.','Dr.','U.S. Senator','U.S. Representative','Governor','Governor’s Cabinet Secretaries','Attorney General','State Senator','State Representative','Judge','Mayor','Consul-General','Ambassador','Ambassador to the U.S.','President of a Country','Former President','Lady','Police Chief','Chief Marshal','Dean','Professor','Priest','Pastor','Monsignor','Cantor','Rabbi','Nun or Sister','Brother','Bishop','Cardinal','Swami'}; 

List<Contact> listContact= new List<Contact>(); Contact objCon = new Contact(); 

for(Integer i=0;i<no_of_contact ;i++){ 
objCon = new Contact(); 
objCon.FirstName= FirstName; 
objCon.LastName= LastName; 
objCon.Salutation= lstSalutation[i]; objCon.Giving_Status__c= 'Prospect'; objCon.npe01__Primary_Address_Type__c = 'Residence'; objCon.MailingStreet = 'test'+i; 
objCon.Street_2__c = 'test 2'+i; objCon.MailingState='test'+i; objCon.MailingCity='test'+i; objCon.MailingCountry='test'+i; 
objCon.Gender__c = 'Female'; 
objCon.FirstName= FirstName; if(i/2 == 0){ objCon.Gender__c= 'Male'; 
} 
else{ 
objCon.Gender__c= 'Female'; 
} 
objCon.Unique_ID__c = String.valueOf(i); listContact.add(objCon); 
} 
System.debug('listContact'+listContact); 
return listContact; 
}

ERROR thrown - 
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, npsp.TDTM_Contact: execution of AfterInsert

caused by: System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []

(npsp)






: []

Any help would be really really appreciated.

I checked other post from Stackexcahnge as well and tried work around but no luck yet.
Stack excahnge similar issue link - https://salesforce.stackexchange.com/questions/79799/how-to-debug-the-mysterious-duplicate-value-found-unknown-duplicates-value-o


--
Kind Regards
Mustafa
Hi All,

Please look into this, I am not able to call the jQuery datatable function. Below are the details - 

DatatableApp.app - 
<aura:application >
        <c:DatatableComponent />
</aura:application>

DatatableComponent.cmp -
<aura:component controller="DatatableController">
<!-- Static Resource details - jQuery js file --> (jQUerySource), jQuery Datatable file --> (jqueryDatatableJS) -->
	<ltng:require scripts="/resource/1466061468000/jQuerySource,/resource/1466061531000/jqueryDatatableJS" afterScriptsLoaded="{!c.jsLoaded}"/>
<!-- doInit method will call JS controller and then will get the details from Apex Controller and put in into the HTML using aura:iteration -->
  <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> 
              <table class="display" id="#sampleTable">
			<thead>
				<tr>
					<th>ID</th>
				</tr>
			</thead>
			<tbody>
				  <aura:iteration items="{!v.cases}" var="case">
         <tr><td>1</td><td>{!case.Id}</td></tr>
       </aura:iteration>
			</tbody>
		</table>
        </div>
        <div class="col-md-2"></div>
    </div>
 </aura:component>
DatatableComponentController.js - 
 
({
    jsLoaded: function(component, event, helper) {
        debugger;
        $('#sampleTable').DataTable();
    },
   doInit: function(component, event, helper) {    
      helper.getCaseList(component);   
   }
})
DatatableComponentHelper.js - 
({
    getCaseList: function(component) {
    var action = component.get("c.getCases");
    var self = this;
    action.setCallback(this, function(actionResult) {
        component.set("v.cases", actionResult.getReturnValue());            
    });
    $A.enqueueAction(action);
  }   
})
DatatableController.apxc - 
public class DatatableController {
   @AuraEnabled
   public static List<Case> getCases() {
       system.debug([SELECT Id FROM Case limit 10]);
       return [SELECT Id FROM Case limit 10];
   }   
}
On click of preview button. I am getting this error -

User-added image

I am using jquery data table (https://datatables.net/) here.

Need urgent help.

Thank you in advance.
 
Hi,

This was working perfectly fine from past so many months and suddenly 2 days back this started throwing an error while executing test classes.

Code to execute
List<Contact> listContact = ContactTestDataFactory.createContact(1, 'FirstName', 'LastName'); insert listContact;

ContactTestDataFactory Test Class -
//Create Contact object 
public static List<Contact> createContact(Integer no_of_contact,String FirstName, String LastName){ 

List<String> lstSalutation = new List<String>{'Mr.','Ms.','Mrs.','Miss.','Dr.','U.S. Senator','U.S. Representative','Governor','Governor’s Cabinet Secretaries','Attorney General','State Senator','State Representative','Judge','Mayor','Consul-General','Ambassador','Ambassador to the U.S.','President of a Country','Former President','Lady','Police Chief','Chief Marshal','Dean','Professor','Priest','Pastor','Monsignor','Cantor','Rabbi','Nun or Sister','Brother','Bishop','Cardinal','Swami'}; 

List<Contact> listContact= new List<Contact>(); Contact objCon = new Contact(); 

for(Integer i=0;i<no_of_contact ;i++){ 
objCon = new Contact(); 
objCon.FirstName= FirstName; 
objCon.LastName= LastName; 
objCon.Salutation= lstSalutation[i]; objCon.Giving_Status__c= 'Prospect'; objCon.npe01__Primary_Address_Type__c = 'Residence'; objCon.MailingStreet = 'test'+i; 
objCon.Street_2__c = 'test 2'+i; objCon.MailingState='test'+i; objCon.MailingCity='test'+i; objCon.MailingCountry='test'+i; 
objCon.Gender__c = 'Female'; 
objCon.FirstName= FirstName; if(i/2 == 0){ objCon.Gender__c= 'Male'; 
} 
else{ 
objCon.Gender__c= 'Female'; 
} 
objCon.Unique_ID__c = String.valueOf(i); listContact.add(objCon); 
} 
System.debug('listContact'+listContact); 
return listContact; 
}

ERROR thrown - 
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, npsp.TDTM_Contact: execution of AfterInsert

caused by: System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []

(npsp)






: []

Any help would be really really appreciated.

I checked other post from Stackexcahnge as well and tried work around but no luck yet.
Stack excahnge similar issue link - https://salesforce.stackexchange.com/questions/79799/how-to-debug-the-mysterious-duplicate-value-found-unknown-duplicates-value-o


--
Kind Regards
Mustafa
This field then needs to display as a merge field on an Opportunity Email Template.

E.g. opp 1 - total order amount (across 2 orders in this FY) = $3000
        opp 2 - total order amount (across 1 order in this FY) = $1000
       Field should display $4000 as it's look across all orders for the whole Organisation.

 Also, how do I set the formula up so that it will only display the correct detail for this FY and how do I set it up for subsequent FYs, or will the formula have be changed each year?

Cheers,
Nicola.
Hi ,
we need to send case for submit for approval.
User perspective :
when he click on submit for appproval, User need to able select list approvers to appprove.
1.  it need to multipule user and if he selected 2 approvers both approvers need to approver case.
2. Submitter has to ablilty recall for submission

How can we acheive it ?
Thanks for advance !!

Regards,
Bhanu
Hi,
in Salesforce lightning in files or Notes/Attachments of a contact or account you can see a preview of the first page from a stored pdf.
How is that possible?

Here is the code which I extract from the page.
<img src="https://DOMAIN.content.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB120BY90&amp;versionId=0688E00000091mE&amp;operationContext=CHATTER&amp;contentId=05T8E0000009v54" class="thumbnailImg medium" alt="PDF">

Screenshot:
User-added image

Thanks,
Sascha
I have a 17GB PST file which seems to be corrupt, I repaired my PST with ScanPST.exe but did not get all my data. Please give suggestion how can I repair my PST file its very important for me. 
Hi,
Is there a way to create a custom email button something in lines of below but this button can be on account, opportunity or lead. Is there a way to dynamically fetch the id of the record where the button is. For example if the below button is on Lead then the URL parameter should determine p3_lkid={!Lead.Id}, p4={!Lead.OwnerEmail}, etc. And also can it pass it over to the email template.

'/email/author/emailauthor.jsp?p2_lkid={!Contact.Id}&p4={!Opportunity.OwnerEmail}&rtype=003&p3_lkid={!Opportunity.Id}&template_id=00X30000000eCGt&retURL=/{!Opportunity.Id}'

Thank You
I have an integration that a customer is using and they are getting this error when trying to create a record:
"Unable to create/update fields: app__Status__c, app__ReferenceNum__c. 
 Please check the security settings of this field and verify that it is read/write 
 for your profile or permission set.\",\
 "errorCode\":\"INVALID_FIELD_FOR_INSERT_UPDATE\",\"
 fields\":[\"app__Status__c\",\"app__ReferenceNum__c\"]}]"


I cannot reproduce this error no matter how I change my permissions and settings. None of the posts about INVALID_FIELD_FOR_INSERT_UPDATE seem to be related to this issue.

I'm creating it with the ruby gem as follows
client.create('app__Idea__c', Name: xxx, 
        app__ReferenceNum__c: xxx, app__Status__c: xxx)
What is causing this error and or how can I recreate it?

Thanks
Hi All,

I have two picklist fields in vf page, i want to retain field dependency between the two in my page. I am using standard controller and no pageblock component used. Any ideas?

Thanks.
  • August 22, 2017
  • Like
  • 0
Hello Everyone I am new to Jquery and I have got a requirement to crate a list which could be sorted by drag and drop. Initially my plan was to get the order number using the positions but this method was not helpful becuase in differant related lists it has differant order number. So my only option is to get the Id of the updated record. I have tried many things but i am not able to get the Id as i should try some dynamic method. Would be great if anyone could guide me on how to get the Id. I have added my Visualforce and jquery code below.
 
<apex:page controller="DragController" >
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <title>jQuery UI Sortable - Default functionality</title>
        <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
        <link rel="stylesheet" href="/resources/demos/style.css"/>
        <style>
            #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
            #sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 35px; }
            #sortable li span { position: absolute; margin-left: -1.3em; }
        </style>
        <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
        <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
        <script>
        $( function() {
            $( "#sortable" ).sortable({
                start: function(event, ui) {

                    var start_pos = ui.item.index();
                    ui.item.data('start_pos', start_pos);
                    
                },
                change: function(event, ui) {
                    var start_pos = ui.item.data('start_pos');

                    if (start_pos < index) {
                        $('#sortable li:nth-child(' + index + ')').addClass('highlights');
                    } else {
                        $('#sortable li:eq(' + (index + 1) + ')').addClass('highlights');
                    }
                },
                update: function(event, ui) {
                    var start_pos = ui.item.data('start_pos');
                    var end_pos = ui.item.index();
                    var order_number = end_pos+1;
                    var fnumber = start_pos+1;
                    var test = $('#test').attr('name'); 

                    alert ("starting order "+fnumber);
                    alert ("Ending order "+order_number);
                    alert (test);
          
                    startingOrder(fnumber);
               
                    $('#sortable li').removeClass('highlights');
                }   
                
            });
            
            $( "#sortable" ).disableSelection();
            
        } );        
        
        </script>
    </head>
    <body>
        <apex:form id="form">
      
            <ul id="sortable">
                <apex:repeat value="{!Accounts}" var="acc">
                    
                    <li class="ui-state-default" id="{!acc.id}"   >
                        <span id="test" name="{!acc.id}">{!acc.id}</span></li>
                </apex:repeat>
                
                <apex:actionFunction action="{!updateOrder}" name="startingOrder" reRender="form" > 
                    <apex:param name="param1" value="{!starting_order}"/> 
                </apex:actionFunction>
                
            </ul> 
        </apex:form>        
    </body>    
</apex:page>

 
Hi All, 

I have a scenario,
a Lead is created with "Marketing User" owner.
then if  a lead owner is changed to anyone other than "Marketing User"  and if the MF picklist value is Raw lead, then do Field update on the picklist to  MQL.
I wrote a WF, 
when a lead is created or edited to meet subsequent crietria  ( true) ,
In formula ,
AND( OwnerId  <> "005U0000005UxG7",  ISPICKVAL( Marketing_Funnel__c , 'Raw Lead') ) then do FU on picklist to MQL.

It is not firing when lead owner is changed  with link "change lead owner". After lead owner is changed to someone else , open lead record and save. then it is checking if owner is not marketing user and if picklist is Raw lead and then Updating picklist to MQL.

I need it to update when the lead owner is changed with "change lead owner"  and hit save. what am i dping wrong?
so i edited my formula to,
AND( ISCHANGED( OwnerId ), OwnerId  <> "005U0000005UxG7",  ISPICKVAL( Marketing_Funnel__c , 'Raw Lead') )
I get "Error: Function ISCHANGED may not be used in this type of formula". Any suggestions please.

  
when do we go for action function tell me 2 scenarios
Hi,

I'm having issues with some PB and wondering if doing something wrong.

When building a Scheduled Action in pb, it gives 2 options. 1- x Days after "Date Field", or 2- X Days from now

What does Now represents?

Is ti the equivalent of workflow "X Days after rule trigger date"?

Or Now = moment i created PB?

Or something else?

Looked everywhere and nowhere seems to explain this clearly

Thx
  • August 17, 2017
  • Like
  • 0

Hi All, 

I'm trying to complete the Process automation trail -> completeing the task "Automate sets of delayed actions with workflow" I made a couple of errors my first attempt - and deleted the workflow. The problem is I have also deleted the unique identifier that trail head uses to mark the test. Is there any way to get that unique identifier back or resolve this issue to complete the activity? 

thank you in advance, 
Steph 

hI friends,
pop up is not working on my vf page properly.
actually i am working on pageblock table,if the size of pageblock table is higher then the pop up is changed accordingly.if that is low,it changes.
based on back ground scroll bar,the pop up chenges automatically.
so please find this solution.
 
When I click "Save to server", I am getting one error like this for each class.

Save error: invalid cross reference id

I do not use any object by id in the code. Same of the classes are emtpy. I have used "refresh from server" followed by "save to server" multiple times and the list of error appears again.

User-added image
Hello,

Just a little background on my situation, I'm a new Admin/Developer for Salesforce, my company recently started using Salesforce and I'm trying to fulfill all the needs as they come. I have NOT had the time to go through any formal trainning on Salesforce Admin/Dev, I do have .Net programming experience though.

What I need help with is an issue with downloading Files/Attachments from an Opportunity, currently we have users that will upload 5-15 PDF's to an Opportunity and a different user will need to download all the files to process them in another system. Currently I don't see any way to "Download All Files" so the users have been downloading them one at a time and when they have 5-10 different Opportunities like this it becomes a time consuming task.

I have been tasked with finding an efficent way to download all the files/attachments, to accomplish this task I was trying to access the attachments from Apex so I could work with them programmically. Currently I can't even get that to work, everything I try returns zero rows, so this is how I was trying to access those Files/Attachments. Again I am very new, so feel free to suggest better methods to accomplish this task! 

string opportunityId = '0018000000M34fSfdsfS';
List<Attachment> attList = [Select Id, Name FROM Attachment WHERE ParentId =: opportunityId];

I know the Opportunity has Files that I can view but still the query returns zero rows. I also tried some combinations of CombinedAttachments and ContentDocument but still struggling, any help would be greatly appreciated! 
I am calling a batch through a system.scheduleBatch(BatchableClass(query), 'Job Name', MinutesToExecute) method. How can I check if the batch job Job Name is already scheduled?

Thanks in advance.
I have a lightning component that implements lightning:actionOverride how do I get the recordId of the parent when the action is triggered from a related list?