• Ian Quah
  • NEWBIE
  • 35 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 9
    Replies

so I'm running into the issue below when I try to upload my changeset from my sandbox to production
 
Surgery__c-Pre-Assessment Page Layout 908 34 In field: customButtons - no WebLink named Surgery__c.Filter_Fields found

I've gone into the setup and looked in the page layouts as well as the "Buttons links and actions" section for both the production and sandbox and I can't seem to find a Filter_Fields section in either so I'm not really sure what to do.
Filter fields was a visualforce page I created a while back and subsequently deleted (after uploading it, unfortunately) but now I can't seem to find where it's being referenced on the surgery object
This is an error under "Create a Self-Signed SSL Certificate and Private Key
Creating"

On Step 2: 
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
I get the error of "You must type in 4 to 1023 characters" and even if I change that, the generated server.pass.key i still empty so when I run Step 3
 
openssl rsa -passin pass:x -in server.pass.key -out server.key

I get the error of 
 
unable to load Private Key
139667048820672:error:0906D06C:PEM routines:PEM_read_bio:no start line:crypto/pem/pem_lib.c:691:Expecting: ANY PRIVATE KEY

I'm using arch linux if that helps? Has anyone encountered this issue? As far as I can tell this is a new module since CI was announced not too long ago
Public Clinic_Patient__c patient{get;set;}
Public Clinic_Patient__c  patient_owner{get;set;}
Public String SurgeryID{get;set;}


SurgeryID = System.currentPageReference().GetParameters().get('SurgeryID');
patient = [SELECT Patient_Name__c FROM Clinic_Patient__c where Id = :SurgeryID];
patient_owner = [SELECT Owner.Name, Owner.firstname, Owner.email FROM Clinic_Patient__c where Id = :SurgeryID];
My sample code is as above. When I do
 
System.debug(patient_owner)
all I see is just the OwnerID, and the ID (I do not see Name, firstname or email). Does anyone know what's happening? I have verified that those things exists and that it should not be null or empty.
For example I have an object called "Class"

I have two instances of "Class": First, and Second

I want to define a picklist field called "Options" which essentially shows what they can do. Understandably, they have different things that they can do. Is there any way for me to display different values for the different instances but have it all under the "Options" picklist? 
    
<script>
function myMod(num, denom){
    alert(num % denom);
    return (num % denom) == 0;
}
</script>

-- stuff 


<apex:variable value="{!1}" var="rowNum"/>
<apex:repeat value="{!things}" var="thing">
-- stuff -- 
    <apex:outputPanel rendered="myMod({!rowNum}, 4)" layout="none"> <hr/> </apex:outputPanel>
    <apex:variable var="rowNum" value="{!rowNum + 1}"/>
</apex:repeat>
Can anyone point me in the right direction with how I add breaks to the display within a repeat tag? 
 
What is the scope of lightningStylesheets? From the docs I got the impression that I could just throw it in at the top of my file and have it show up like a lightning designed file but upon trying it that was not the case.

The visualforce page
<apex:page controller="filtered_fields_controller" lightningStylesheets="true">
    <apex:slds />

    <body>
        UserID is {!userID}
    </body>

    <apex:form >
        <apex:pageBlock title="My Content" mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="My Content Section" columns="2">
                <apex:inputField value="{!userID.name}"/>
                <apex:inputField value="{!userID.site}"/>
                <apex:inputField value="{!userID.type}"/>
                <apex:inputField value="{!userID.accountNumber}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    
</apex:page>

The controller
public class filtered_fields_controller {

    Public String userID{get;set;}
    Public Account account{get;set;}
    
    public filtered_fields_controller() {
        // Getting fed arguments
        userID = System.currentPageReference().GetParameters().get('userID');
        
        System.debug('Current surgery ID ' + userID);
    }
}

 
I'm interested in getting/viewing the source code generated by the building process as described in page layouts for custom objects. Does anyone know if it's possible?

I ask because I'd like to conditionally hide some of the fields, but building the entire process to look like it does would also be a lot of work so if possible I'd like to access the backend code and just modify that instead.

I have cross-posted this on StackOverflow but haven't gotten any responses so I'm not sure if what I'm hoping to do is possible
1) Is it possible to do it without generating or "rendering" the apex pages?

Currently, I have code that does it in apex pages, where it takes in the apex page as an argument then collects the data before processing the blob. However, to do so I have to be ON the apex page before clicking the button to generate it.

Is it possible to "generate" the apex page (without actually making it show up on screen / being redirected to it) on a lightning page so that I can pass it as an argument to the pre-existing code?

I ask because I have a lightning page that shows a list of all users elligible for profile generation. It doesn't make sense to click on the user to be redirected to their apex:page before being able to generate the CSV or XLS or PDF. Instead, I want buttons available on the lightning page which I can click on to handle all of that.

2) I found some links about generating PDF and CSV within lightning but I'm wondering what the downsides are (so that I can make an educated decision on if I can live with it)

https://medium.com/@ToAnshulVerma/salesforce-lightning-generate-pdf-from-lightning-components-with-in-memory-data-cd5dffe0fe25

http://www.sfdcmonkey.com/2017/04/19/download-csv-file-data-salesforce-lightning-component/
Hey all,

Was wondering if someone could give me an idea on how to proceed. Say I have a list of users, and I want to present some admin with the ability to choose what type of profile to generate for each user.

Component Code: 
<aura:iteration var="user" items="{!v.Users}" indexVar="index">
    <div class="slds-button-group" role="group">
                    <lightning:button aura:id="CSV-Button" class="slds-button slds-button_neutral" label='CSV' onclick="{!c.selectedButton}" value="{!index}"/>
                    <lightning:button aura:id="PDF-Button" class="slds-button slds-button_neutral" label='PDF' onclick="{!c.selectedButton}" value="{!index}"/>
                    <lightning:button aura:id="XML-Button" class="slds-button slds-button_neutral" label='XML' onclick="{!c.selectedButton}" value="{!index}"/>
            </div>
</aura:iteration>        
Controller code: decided to implement the "tracking" of admin choices as a dictionary as they can make the user selections not in order.
selectedButton : function(component, event, helper) {   
        
        // Event data
        var evtSource = event.getSource();        
        var whichButton = evtSource.getLocalId();
        var map_key = evtSource.get("v.value");
        var dict_map = component.get("v.dataMap");
        console.log("Original value ");
        console.log(dict_map);

       dict_map[map_key] = whichButton; 
       console.log("New value "); 
       console.log(dict_map); 
       component.set("v.dataMap", dict_map); 
}

How can I change the lightning component code so that a selection is marked (so the end-user knows what they've selected)?

I was thinking of making it as such

User PDF[] CSV[] XML[] - Chosen: PDF

where it is currently 

User PDF[] CSV[] XML[]

However, I'm running into the problem of not knowing how to "return" the button that was chosen so that it can be displayed correctly for each user.
Say I have two separate lightning resources: A, and B.

How would I pass variables between the two? If, for example, in page A I get all the individuals for whom I can generate profiles (example: word docs) how do I then pass that list of people eligible for profile generation to B, where I can then iterate through the values to generate them?

Or is there an elegant solution to the problem that I didn't see?
If I have some object A, that has fields
 
Name(string), B__c (sObject) and C__c (sObject)

B__c has the fields 
    
Name(string), BB__c (string of "Yes", "No" and "Maybe)

and C__c has the fields 
 
Name(string), CC_c (bool)



how would I filter such that I can get all A's where 
 
A.B__c.BB__c == "Yes" and A.C__c.CC__c == true



I basically tried the following but I got an error about sObject
 
return [
            SELECT Id, Name, B__c, C__c
            FROM A
            WHERE B__c.BB__c = :"Yes"
            And C__c.CC__c = :true
        ];



 

so I'm running into the issue below when I try to upload my changeset from my sandbox to production
 
Surgery__c-Pre-Assessment Page Layout 908 34 In field: customButtons - no WebLink named Surgery__c.Filter_Fields found

I've gone into the setup and looked in the page layouts as well as the "Buttons links and actions" section for both the production and sandbox and I can't seem to find a Filter_Fields section in either so I'm not really sure what to do.
Filter fields was a visualforce page I created a while back and subsequently deleted (after uploading it, unfortunately) but now I can't seem to find where it's being referenced on the surgery object
Public Clinic_Patient__c patient{get;set;}
Public Clinic_Patient__c  patient_owner{get;set;}
Public String SurgeryID{get;set;}


SurgeryID = System.currentPageReference().GetParameters().get('SurgeryID');
patient = [SELECT Patient_Name__c FROM Clinic_Patient__c where Id = :SurgeryID];
patient_owner = [SELECT Owner.Name, Owner.firstname, Owner.email FROM Clinic_Patient__c where Id = :SurgeryID];
My sample code is as above. When I do
 
System.debug(patient_owner)
all I see is just the OwnerID, and the ID (I do not see Name, firstname or email). Does anyone know what's happening? I have verified that those things exists and that it should not be null or empty.
    
<script>
function myMod(num, denom){
    alert(num % denom);
    return (num % denom) == 0;
}
</script>

-- stuff 


<apex:variable value="{!1}" var="rowNum"/>
<apex:repeat value="{!things}" var="thing">
-- stuff -- 
    <apex:outputPanel rendered="myMod({!rowNum}, 4)" layout="none"> <hr/> </apex:outputPanel>
    <apex:variable var="rowNum" value="{!rowNum + 1}"/>
</apex:repeat>
Can anyone point me in the right direction with how I add breaks to the display within a repeat tag? 
 
I'm interested in getting/viewing the source code generated by the building process as described in page layouts for custom objects. Does anyone know if it's possible?

I ask because I'd like to conditionally hide some of the fields, but building the entire process to look like it does would also be a lot of work so if possible I'd like to access the backend code and just modify that instead.

I have cross-posted this on StackOverflow but haven't gotten any responses so I'm not sure if what I'm hoping to do is possible
Say I have two separate lightning resources: A, and B.

How would I pass variables between the two? If, for example, in page A I get all the individuals for whom I can generate profiles (example: word docs) how do I then pass that list of people eligible for profile generation to B, where I can then iterate through the values to generate them?

Or is there an elegant solution to the problem that I didn't see?