• Lee Anne G
  • NEWBIE
  • 15 Points
  • Member since 2017
  • Programmer/Analyst
  • BAE SYSTEMS

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 6
    Questions
  • 8
    Replies
Hi, I'm trying to replace our javascript buttons in Lightning. 

Here's what I want to do:
Have a button on a related list (opportunity items). When I click the button, it calls a visualforce page, that has the action parameter in the apex:page section calling a method in the extension that sets the discount type. It works great. The last thing I need to do is be able to pass a variable/parameter to define the discount I want applied so I can use the same controller extension for all three discount types. 

I don't want the user to even know they are calling a VF page. Just that they're clicking a button that says : "Apply DOD Discount" and that discount is applied to all the items they have selected.

There doesn't seem to be a way to do this.
 
Hi, I need to show a list of returned rows with a radio input in a lightning component. In visualforce it would look like this: 
<apex:pageblocktable value="{!addresses}" var="pro" rendered="{!NOT(ISNULL(addresses))}">       
         <apex:column headerValue="Select Address">
                <apex:actionSupport action="{!getValue}" event="onclick" reRender="">                
                        <input type="radio" name="<strong>selectRadio</strong>" id= "radio"/>
                                <apex:param name="proid" value="{!pro.id}" assignTo="{!paramValueFromPage}">
                                </apex:param>
                 </apex:actionSupport>                        
                </apex:column>
                <apex:column value="{!pro.Name}"/>
                <apex:column value="{!pro.Account__r.Name}"/>
                <apex:column value="{!pro.Account__r.Site__c}"/>
                <apex:column value="{!pro.Address1__c}"/>
                <apex:column value="{!pro.Addressee__c}"/>
     </apex:pageBlocktable>

How do we achieve the same result in a lightning component? In my test component, I have the following markup:
​    <aura:handler name="init" value="{!this}" action="{!c.getProfilesList}" />
    
    <lightning:datatable data="{! v.Profiles }" 
                         columns="{! v.Columns }" 
                         keyField="Id" 
                         hideCheckboxColumn="false"/>

with my controller:
({
    getProfilesList : function(component, event, helper) {
        component.set("v.Columns", [
            {label:"Profile Number", fieldName:"Name", type:"text"},
            {label:"Attention", fieldName:"Address_Line_1__c", type:"text"},
            {label:"Company/Addressee", fieldName:"Company_Addressee__c", type:"text"},
            {label:"Profile Type", fieldName:"Profile_Type__c", type:"text"},
            {label:"Ship To Contact", fieldName:"Ship_to_Contact_Name__c", type:"text"}
        ]);
        
        var action = component.get("c.getProfiles");
        action.setParams({
            recordId: component.get("v.recordId")
        });
        action.setCallback(this, function(data) {
            component.set("v.Profiles", data.getReturnValue());
        });
        $A.enqueueAction(action);
    }		
})

​I just don't know how to turn this datatable into the radioGroup that I need. All I can find examples of are of  Yes/No or dynamic single columns of data for radio input.

Thanks!
Hi, I did Part 4 of Build Flexible Apps with Lightning Components - Use Base Lightning Components - Part 4. The code shown in number 1 would not display the Property Name until I changed it from <lightning: outputField fieldName="Name /> to <lightning: outputField fieldName="v.property.Name" />
 
<aura:component >
    <aura:attribute name="property" type="Property__c" />
    <lightning:recordViewForm aura:id="viewForm" recordId="{!v.property.Id}" objectApiName="Property__c">
        <lightning:outputField fieldName="v.property.Name"/>
    </lightning:recordViewForm>   
</aura:component>

User-added image
 
Hi, I have a custom button that opens a visualforce page. I have successfully added this button to the custom object List View. However, I really really need to be able to add it to the Search Results layout. It seems to let me add it, but I can't see it after performing a Search. Help!
User-added image

User-added image

See? No button displayed after global search is performed:
User-added image
We have a very simple workflow defind on an Order. If the Status changes, then we have a workflow that changes the "Status as of Date" to Today(). If we change the status through the UI, the workflow fires as expected. 

However, I noticed that if our order Status is updated via SOAP API webservice (from our ERP solution), the Status as of Date doesn't change as expected. 

Everything I've read suggests that the workflow should be firing.

User-added image
User-added image
We have had an interface between SFDC and our company for well over a year. All of a sudden, updates to SFDC are erroring out with:
Environment: %Environment%
Server: %Server%
Transaction Type: %TransactionType%
Error Message: [ISS.0088.9139] Output parameters do not conform to targetOutputSignature:
                errorCode=VV-002
                pathName=/fault/detail/fns:UnexpectedErrorFault/fns:upgradeURL
                errorMessage=[ISC.0082.9026] Undefined Object found
 
                errorCode=VV-002
                pathName=/fault/detail/fns:UnexpectedErrorFault/fns:upgradeMessage
                errorMessage=[ISC.0082.9026] Undefined Object found

No known chages to the environment. Login by the interface user is successful.
As of Spring 20 release, we can again prepopulate field values using a URL - aka URL hacking (see release note here (https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_general_lex_navigate_to_record_dfv.htm)).

I, for one, am so happy for this feature. However, there is one minor problem. When the URL is invoked, the new record modal pops up, and if the user chooses to Cancel, a blank page is displayed instead of returning to the page where the URL was called.

Below is the URL that I'm using. It is invoked with a custom list button located in a related list of an Opportunity.

/lightning/o/Case/new?defaultFieldValues=
AccountId={!Opportunity.AccountId},
Opportunity__c={!Opportunity.Id}

I've tried including a retunURL parameter - in different places in the URL. But no luck.
Hi, I'm trying to replace our javascript buttons in Lightning. 

Here's what I want to do:
Have a button on a related list (opportunity items). When I click the button, it calls a visualforce page, that has the action parameter in the apex:page section calling a method in the extension that sets the discount type. It works great. The last thing I need to do is be able to pass a variable/parameter to define the discount I want applied so I can use the same controller extension for all three discount types. 

I don't want the user to even know they are calling a VF page. Just that they're clicking a button that says : "Apply DOD Discount" and that discount is applied to all the items they have selected.

There doesn't seem to be a way to do this.
 
I have a use case where in i need to develop a reusable lightning component but with dynamic fields to display
For eg: the lookup component should display A,B,C fields in one part and
X,Y,Z fields on another part in the same application
how can i achieve this using one component only?

Any help would be appreciated
 
Hi, I have a custom button that opens a visualforce page. I have successfully added this button to the custom object List View. However, I really really need to be able to add it to the Search Results layout. It seems to let me add it, but I can't see it after performing a Search. Help!
User-added image

User-added image

See? No button displayed after global search is performed:
User-added image
We have a very simple workflow defind on an Order. If the Status changes, then we have a workflow that changes the "Status as of Date" to Today(). If we change the status through the UI, the workflow fires as expected. 

However, I noticed that if our order Status is updated via SOAP API webservice (from our ERP solution), the Status as of Date doesn't change as expected. 

Everything I've read suggests that the workflow should be firing.

User-added image
User-added image

Hi,

 

I have created one visualforce tab. I have put that tab on customer portal .


when i click that tab then following message displayed

 

Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

 

Please help me to resolve this problem

 

Regards,

Sagar Pawar.

  • September 04, 2013
  • Like
  • 0

Hello,

 

Earlier today, I updated a lot of cases using the Apex Dataloader (Ver. 26.0).  Most of my 6k+ cases closed, but 600 of them failed and were given this error:

AssociateCaseToUser: System.LimitException: Too many SOQL queries: 101

 

Since I didn't write this code, I'm flummoxed as to what this means.  Any idea on what I can do with my data to make it process correctly?


Thanks Much.

 

Also--I realize there are posts similar to this one, but no one seemed to be asking about the error in reference to the Data Loader.  If this is a duplicate post, I apologize.

Hi,

 

I am trying to add an attachment to an opportunity using a SOAP message.  Below is the soap message :

 

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:SessionHeader>
         <urn:sessionId>00DA0000000aBVb!AREAQBukBuFfuoatmzmtcp4lg8rPIobjbXbosShxu._d7g_eRrrZVh3fmaXH.CAesIQmGyvUPjF5oTMnYXGwoODbSz7Fbrvs</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
  <urn:Name>zxcxzcxzc.doc</urn:Name>
 <urn:Body> BASE 64 stuff in here ... </urn:Body>
         <urn:sObjects urn:type="Attachment">
            <urn1:fieldsToNull>true</urn1:fieldsToNull>
    <urn1:ParentId>006A0000006dGDkIAM</urn1:ParentId>
    <urn1:OwnerId>005A0000000KRJv</urn1:OwnerId>
    <urn1:ContentType>doc</urn1:ContentType>
         </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>

 

 

I get the following response :

 

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>sf:INVALID_TYPE</faultcode>

         <faultstring>INVALID_TYPE: Must send a concrete entity type.</faultstring>

         <detail>

            <sf:InvalidSObjectFault xsi:type="sf:InvalidSObjectFault">

               <sf:exceptionCode>INVALID_TYPE</sf:exceptionCode>

               <sf:exceptionMessage>Must send a concrete entity type.</sf:exceptionMessage>

               <sf:row>-1</sf:row>

               <sf:column>-1</sf:column>

            </sf:InvalidSObjectFault>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

 

 

The doc is an MS Word doc.  Any ideas what I am doing wrong ? I am able to run queries no problem.

 

Thanks,

 

Prof

 

 

Hello,

I'm creating an Apex class that creates a Salesforce File record and associates it with a parent record. I'm having a problem creating the association (ContentDocumentLink) record.

Here is what I'm doing:
  • Create a ContentVersion record. This creates a ContentDocument record automatically if you leave the ContentVersion.ContentDocumentId field blank. (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentdocument.htm - "To create a document, create a new version via the ContentVersion object without setting the ContentDocumentId. This automatically creates a parent document record.")
  • Insert ContentVersion record
  • DEBUG: Confirm ContentVersion.ContentDocumentId is set (Here is where the problem is because it is NULL; however if I SOQL query ContentVersion after the Apex completes, ContentVersion.ContentDocumentId is set and the corresponding ContentDocument record exists)
  • Create ContentDocumentLink record (commented out because it fails because ContentDocumentLink.ContentDocumentId is a required field)
  • Insert ContentDocumentLink record (commented out because it fails because ContentDocumentLink.ContentDocumentId is a required field)
Here is the code:
public class FileController {
    
    @AuraEnabled
    public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType, Id contentDocumentId) { 
        base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8');
        
        ContentVersion cv = new ContentVersion();
        cv.ContentLocation = 'S';
        cv.ContentDocumentId = contentDocumentId;
        cv.VersionData = EncodingUtil.base64Decode(base64Data);
        cv.Title = fileName;
        cv.PathOnClient = filename;
        
        insert cv;
        
        //***This DEBUG statement must return an Id for the rest of the code to work***
        System.debug('contentDocumentId='+cv.ContentDocumentId);               
        
        //ContentDocumentLink cdl = new ContentDocumentLink();
        //cdl.ContentDocumentId = cv.ContentDocumentId;
        //cdl.LinkedEntityId = parentId;
        //cdl.ShareType = 'I';
        
        //insert cdl;
        
        return cv.Id;
    }

    @AuraEnabled
    public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType) {         
        return saveTheFile(parentId, fileName, base64Data, contentType, NULL);
    }
}

Does anyone know what I'm doing wrong, not considering, etc?
Appreciate any thoughts and input!