• Puja Agarwal 63
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 10
    Replies
For Achieving this one, I have Tried with vf page 
------------------------------------------------------------
<apex:page controller="RetrieveAllObjOnDrpDwn"  showHeader="false" sidebar="false">
    <apex:slds />
    <apex:form id="form">
        <apex:pageBlock title="Choose One Object">
        <apex:selectList value="{!selectedObject}" size="1">
            <apex:selectOptions value="{!objectOptions}" />
            <apex:actionSupport reRender="form" event="onchange" />
        </apex:selectList>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Apex Controller
-------------------
public class RetrieveAllObjOnDrpDwn {
    public String selectedObject { get; set; }   
    public SelectOption[] getObjectOptions() {
        SelectOption[] results = new SelectOption[] { new SelectOption('','-- None --') };
        for(SObjectType sType: Schema.getGlobalDescribe().values()) {
            DescribeSObjectResult res = sType.getDescribe();
            results.add(new SelectOption(res.getName(), res.getLabel()));
        }
        return results;
    }
}

Pls Let me know, going forward steps

 

Good day everyone,

I already posted this on the Lightning section but thought I'd get more views by posting this in General Development.

I've gone through the different SF trailhead guides about creating custom objects and creating relationships etc.  My goal is to ultimately create my own custom object that will display an iframe. However, the iframe's source must be entered by the user.
I can't seem to find any guides that does what I need. I've seen some posts about creating a visual force page but it seems this is outside of the workflow of creating objects.
The end goal is to create my own Lightning Web Component that displays an iframe which also has an input field for users to change the source for the said iframe.
Any help will be appreciated.
 
Thanks,

Hello All, 

I'm trying to create a formula field (Yearly Compliance) for a custom object named Compliance. The formula should add the compliance for the quarter (i.e. Q1_c__c), if not left blankand, and divide those by the number of complete fields. I'm trying to calculate the percent of compliance. The problem is that any of those four number fields could be left on black.

I tried the following formulas in where any of the Qs (i.e. Q1_c__c)  could be a number or could be left blank.

IF( 
AND 
   (Q1_c__c =0, 
    Q1_c__c = 0, 
    Q1_c__c = 0, 
   Q1_c__c = 0
    ),
    0, 
(Q1_c__c + Q2_c__c + Q3_c__c + Q4_c__c)/4)

 

IF(

AND(
ISBLANK(Q1_c__c),
ISBLANK(Q2_c__c),
ISBLANK(Q3_c__c),
ISBLANK(Q4_c__c)
),
NULL,(Q1_c__c + Q2_c__c + Q3_c__c + Q4_c__c)/4)

Here is a picture of the pay layout . 

  • If the quarter is left black, means that do not apply.
  • I'm trying to calculate the percent of Yearly Compliance. Here the Yearly Compliance should be 100% divided by 3. This is because the quarter empty (Q1) do not count for this year compliance. Also, the other two quarters are in 0%. 


Example
 

Yearly compliance should be 33.33%
Hi Developer Community , 


Can u please write test class for this apex code
public class RSSFeedUtil {
    public static List<RSSObject> getGoogleRSSObjects(String theUrl) {
        List<RSSObject> returnList = new List<RSSObject>();
        
        Http h = new Http();
        HttpRequest req = new HttpRequest();        
        req.setEndpoint(theUrl);
        req.setMethod('GET');
        HttpResponse res = h.send(req);
        
        Dom.Document doc = res.getBodyDocument();
        Dom.XMLNode feed = doc.getRootElement();
        String namespace = feed.getNamespace();
        
        for(Dom.XMLNode child : feed.getChildElements()) {
            if(child.getName() == 'entry') {
                RSSObject returnListItem = new RSSObject(
                    child.getChildElement('title', namespace).getText().unescapeHtml4(),
                    child.getChildElement('link', namespace).getAttribute('href', ''),                    
                    child.getChildElement('content', namespace).getText().unescapeHtml4(),
                    child.getChildElement('published', namespace).getText()
                );
                System.debug(returnListItem);
                returnList.add(returnListItem);
            }
            System.debug(returnList);
        }
        return returnList;        
    }
}

Thanks in Advance