• bluecap
  • NEWBIE
  • 50 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 5
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 13
    Replies
Hello,

What is the Salesforce recommended solution for refreshing output values after an event such as onblur? For example, user clicks away from a form field after entering a number, in JS im running a calculation to update a total value displayed on the screen with lightning:formattedNumber. Currently the value in the lightning:formattednumber is not changing even though the value behind the scenes is changing correctly. 
 
<lightning:input onblur="{!c.updateEstimate}" type="number" placeholder="0.00" variant="label-hidden" label="Service or Treatment" value="{!v.wrapperClass.itemCost}" formatter="currency" step="0.01" />
	
<lightning:formattedNumber style="currency" value="{!v.wrapperClass.adjustedtotal}" />
 
updateEstimate : function(component, event, helper) {
        //preloaded percentage amount
		var stPercent = component.get('v.wrapperClass.adjustmentPercent');
		var stCost = component.get('v.wrapperClass.itemCost');

		component.set('v.wrapperClass.adjustedtotal',stCost*stPercent);
		
		debugger;
	}

 
Hi everyone,

Im stumped on an issue and could use some guidance from the community. So to begin, Ive followed the steps out lined in the post here:

http://bobbuzzard.blogspot.com/2015/07/lightning-components-and-custom-apex.html

There I was able to create and initialize my Custom Class and its properties successfully. Now Im trying to update those custom class values in the JS Controller/Helper when a client side action (onblur) occurs, but I am running into a "Cannot read property" error when trying to SET the value of the custom class properties. So referring to Bob's example, I basically want to do this when an event occurs...

component.set('v.counts.numContacts', 50);

..but this returns the following error...

Action failed: c:Component_Calculator$controller$updateTotals[Cannot read property 'numContacts' of null]

Im in the process of creating a lightning component that will preload values on a calculator/estimating tool of sorts. So once the values are initially loaded I want to allow the user to be able to modify the preloaded values that in turn adjusts the total values. All of the values are held within the Custom Class. 

All replys are appreciated. Thanks ahead of time.
  • September 28, 2018
  • Like
  • 0
Hi all,

Im trying to split a string that has a mulitple sets of text enclosed in square brackets. For some reason its not splitting them like I think that it should.. Can anyone tell what Im doing incorrectly?

String tmpBody = 'TestBamo[#taskdate:2016-11-15 00:00:00][#hitcriteria:Proactively schedule a branch visit]';
String[] bodyList = tmpBody.split('\\\[(.*?)\\]'); 
for(String s : bodyList){
    system.debug('------>'+s);    
}

Which returns...

s[0] = TestBamo

I would think this should return the following...

s[0] = [#taskdate:2016-11-15 00:00:00]
s[1] = [#hitcriteria:Proactively schedule a branch visit]

 
Hi all,

We were researching with the new enhanced notes feature prior to the Winter '17 release and I believe we saw the ability to add custom fields to the ContentNote object. But since the last release adding custom fields seems to no longer be an option.  Does anyone know why this didn't make it into Winter?

Thanks ahead of time!
Is it possible to embed a Wave Dashboard in a custom Lightning Component? I know its possible through Lightning pages, but there are limitations there that have caused us to look into custom development. Such as tabs can only be added to Record and Home pages, but not an App (which is totally odd btw!). Ideally we would like to have a single page where users choose which dashboard they would like to view and do this by choosing the dashboard from a picklist or clicking a tab or something similar. So the page would only show one dashboard at a time based on which one they've chosen. 
This seems like a simple task but Im unable to find examples on doing this. I have the following attribute of type Set in my component and I want to use javascript to add/remove items. How is this best accomplished in Lightning JavaScript?

<aura:attribute name="emailList" type="Set" default="[]" description="The list of selected email addresses." />
or
<aura:attribute name="emailList" type="List" default="[]" description="The list of selected email addresses." />
  • September 21, 2016
  • Like
  • 0
Hi all,

Trying to figure out an issue I have with a modal popup window. The error is very cryptic so Im hoping someone here can see what I am doing incorrectly. Basically I have a button group component that has one button (at the moment) and when clicked it needs to popup a modal window. At the moment the modal is failing to popup and displaying the following error.

User-added image

Here's the failing code that Im attempting to use to dynamically create the modal window.

ButtonGroup.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    
    <aura:dependency resource="markup://c:modalDialog" />
    
    <c:container class="demo-container" size="fluid" align="right">
        
        <c:buttonGroup >
            <c:button press="{!c.showModal}" type="neutral">New Suspect</c:button>
        </c:buttonGroup>
        
    </c:container>
    {!v.body}
    <div aura:id="optionalModalDialog">
        
    </div>
    
</aura:component>

ButtonGroupController.js
({
	showModal : function(component, event, helper) {
		helper.showModal(component,'Test Title','Test Message');
	},
    onDestroyModalDialog: function(component){
        var cmp = component.find('optionalModalDialog');
        cmp.set("v.body",[]);
    }
})

ButtonGroupHelper.js - This function is supposed to create the modal from the modalDialog component and push the result into the optionalDialogDiv in the buttongroup component. But is failing at the moment.
({
	showModal : function(component, title, message) {
        $A.createComponent(
            "c.modalDialog",
            {
                "title":title,
                "body":message,
                "onclose":component.getReference("c.onDestroyModalDialog")
            },
            function(msgBox){
                if(component.isValid()){
                    var targetCmp = component.find('optionalModalDialog');
                    var body = targetCmp.get("v.body");
                    body.push(msgBox);
                    targetCmp.set("v.body",body);
                }
            });

    }
})

modalDialog.cmp
<aura:component>
    <aura:attribute name="title" type="String" required="true" />
    <aura:attribute name="closable" type="Boolean" default="true"/>
    
    <aura:attribute name="closeLabel" type="String" default="Close"/>
    <aura:attribute name="cancelLabel" type="String" default=""/>
    <aura:attribute name="confirmLabel" type="String" default="OK"/>
    <aura:attribute name="aura-id" type="String" default=""/>
    
    <aura:attribute name="onclose" type="Aura.Action" default="{!c.defaultCloseAction}"/>
    <aura:attribute name="oncancel" type="Aura.Action" default="{!c.defaultCloseAction}"/> 
    <aura:attribute name="onconfirm" type="Aura.Action" default="{!c.defaultCloseAction}"/>
    
    <aura:attribute name="showDialog" type="Boolean" default="true"/>
    
    <div class="slds">
        <!--class="{!'slds-modal '+((v.showDialog)?'slds-fade-in-open':'slds-fade-in-close')}" -->
        <div class="slds-modal slds-fade-in-open" aura:id="{!v.aura-id}" aria-hidden="false" role="dialog">
            <div class="slds-modal__container">
                <div class="slds-modal__header">
                    <h2 class="slds-text-heading--medium">{!v.title}</h2>
                    <aura:if isTrue="{!v.closable}">
                        <button class="slds-button slds-button--icon-inverse slds-modal__close" onclick="{!v.onclose}">
                            <c:svgIcon svgPath="{!$Resource.slds + '/assets/icons/action-sprite/svg/symbols.svg#close'}"
                                       category="standard"
                                       size="small"
                                       name="close" />
                            <span class="slds-assistive-text">{!v.closeLabel}</span>
                        </button>
                    </aura:if>
                    
                </div>
                <div class="slds-modal__content slds-p-around--medium">
                    <div>
                        {!v.body}
                    </div>
                </div>
                <div class="slds-modal__footer">
                    <aura:if isTrue="{!v.cancelLabel != ''}">
                        <button class="slds-button slds-button--neutral" onclick="{!v.oncancel}">{!v.cancelLabel}</button>
                    </aura:if>
                    <button class="slds-button slds-button--neutral slds-button--brand" onclick="{!v.onconfirm}">{!v.confirmLabel}</button>
                </div>
            </div>
        </div>
        <!--<div class="{!'slds-backdrop '+((v.showDialog)?'slds-backdropDOUBLEDASHopen':'slds-backdropDOUBLEDASHclose')}"></div>-->
        <div class="slds-backdrop slds-backdrop--open"></div>
        
    </div>
</aura:component>

modalDialogController.js
({
	defaultCloseAction : function(component, event, helper) {
		$A.util.addClass(component,"hideModal");
	}
    
})
Thoughts?
 
Hi all,

Whats the best way to go about formatting a datetime value within a lightning component? Im just using ui:outputDateTime at the moment, but would like to apply a specific format. Is there something similar to VF's apex:outputText tag, similar to below?
 
<apex:outputText value="{0, date, MMMM d','  yyyy}">
    <apex:param value="{!contact.Birthdate}" /> 
</apex:outputText>

Thanks ahead of time. All suggestions are appreciated.
Hi all,

I have a lightning component that displays a list of records. On each of the records I have a button group and each button needs to perform an action on that particular record. So my question is, how do I pass (or go get) the object record or the record ID to the JS controller?

Heres is my component.cmp...
<aura:iteration items="{!v.timeline.entries}" var="entry">
	<li class="slds-timeline__item" id="alertItem"><!-- {!'alertItem_' + entry.feedItemId}-->
		
		<div class="slds-media slds-media--reverse">
			<div class="slds-media__figure">
				<div class="slds-timeline__actions">
					 <!--button group - start-->
					
					<div class="slds-button-group" role="group">
					  <button class="slds-button slds-button--icon-border" onclick="{!c.showModal}">
						<c:BBsvg class="{!'slds-button__icon'}" xlinkHref="{!'/resource/BB_SLDS091/assets/icons/utility-sprite/svg/symbols.svg#edit'}" />
						<span class="slds-assistive-text">Edit</span>
					  </button>
					  <button class="slds-button slds-button--icon-border" onclick="{!c.dismissAlert}">
						<c:BBsvg class="{!'slds-button__icon'}" xlinkHref="{!'/resource/BB_SLDS091/assets/icons/utility-sprite/svg/symbols.svg#clear'}" />
						<span class="slds-assistive-text">Dismiss</span>
					  </button>
					  <button class="slds-button slds-button--icon-more" onclick="{!c.showModal}">
						<c:BBsvg class="{!'slds-button__icon'}" xlinkHref="{!'/resource/BB_SLDS091/assets/icons/utility-sprite/svg/symbols.svg#clock'}" />
						<span class="slds-assistive-text">Snooze</span>
					  </button>
					</div>
					
					<!--button group - end-->
					
				</div>
			</div>
			<!-- more about the record resides here -->
		</div>
	</li>
</aura:iteration>
Here is my controller.js...
({

    showModal : function(component, event, helper) {
    	document.getElementById("backGroundSectionId").style.display = "block";
    	document.getElementById("snoozeSectionId").style.display = "block";
    },
    dismissAlert : function(component, event, helper) {
		//update record as dismissed - how do I pull in the specific record id from the list in the UI?
    	document.getElementById("alertItem").style.display = "none";
    },
    saveRecord : function(component, event, helper) {
    	//save changes to the record
    }
})

All suggestions are appreciated. Thanks!
 
Hi all,

Hoping you all can help me. Im trying to dynamically display (include) X number of visual force pages on a single parent page. Im getting the following error when I try to save the VF code below:
 
<apex:repeat value="{!strings}" var="str" id="theRepeat"> 
	<apex:include pageName="{!str}"/>
</apex:repeat>
...
public String[] getStrings() {
        return new String[]{'pagename1','pagename2'};
}
...

ERROR:
Result: [COMPILE FAILED]: (MyDashboard) Unknown property 'ctrl_MyPage.str'  (Line: 1, Column: -1)

All suggestions are appreciated.

Thanks!






 
Hello,

Im trying to reset a portal user password, but the button is not displaying on the portal user detail page. Mainly I just want to set the password for the portal user. Whats the best way to do this?  Thanks ahead of time!
Hi all,

Is it possible to give a 3rd party application access to a custom webservice without giving them access to the standard API? 

To give a little background on my project. Users will use their Salesforce credentials to login and register on one of our sister company's websites. Once they have logged into the site using their Salesforce credentials, the user needs the ability to pull down Salesforce data they own, such as customer information. 

What we have built for this works great, but the issue is being able to restrict the users to the custom service. Our security team his holding up this project because of the additional access to the standard api.

Any thoughts on how to limit access to the custom service only?



 
Hello,

Ive created a custom REST webservice within Salesforce.com. This webservice will be consumed by users from a 3rd Party website that register on that site with their Salesforce.com credentials. I would like to allow users to consume my custom webservice but do not want to give them free reign of all data they own via the Salesforce.com APIs in the process. This is due to the sensitivity of some of the information that we do not want to provide via the custom web service. So I could use some advice on how best to accomplish this, here's what I have done so far..

1. Ive created a Connected App that uses OAuth for authentication and allowing the following scopes..
  • Access your basic information (id, profile, email, address, phone)
  • Perform requests on your behalf at any time (refresh_token, offline_access)
2. Ive created a custom apex class that defines the REST service and given permission to this class to the proper profiles.

What steps do I need to perform to make sure the users only have access to the REST service and not all data?

Thank you for your help. All suggestions are appreciated!

I have created a Connected App so that the 
Ive created a single custom Rest service that Im trying to use to return multiple sObject types with. Im using cURL to verify that the service is working. The issue Im running into is occuring when I pass more than one parameter to the service.

This works:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=a -H 'Authorization: Bearer access token'

This does not work:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=b&id=001 -H 'Authorization: Bearer access token'

and returns..
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

Why would the second parameter cause this type of error?


 
Hi,

Ive been ask to assist a developer setup authentication between Salesforce and his custom website. We want to configure the authentication as SSO, so when users view his website (through an iframe in Salesforce) they do not have to login with their separate credentials. 

I have not setup SSO in this manner so mainly I could use some help getting started. Im also not an expert on configuring OAuth, but have enough experience with Salesforce API's to know he will likely need the user's token to make this work(?). Anyway, here are a few specific questions that I have...

1) What information do I send his website? Token? How do I obtain the current users token so I can pass it through the iFrame to log them into his website? 
2) What configurations need to be setup in Salesforce to make the connection? IP Whitelist? Single Sign-On Settings? Remote Site? Or others?

For now nothing will be passed back into Salesforce from his website, we just don't want users to have to login separately each time they visit his site through Salesforce.

All comments and suggestions are appreciated. Thanks ahead of time!
Hello,

Is it possible to enforce a Session Timeout for Salesforce1 users?  I see under Setup-->Connected Apps-> Salesforce1 --> Mobile Integration there are settings for having a PIN and being able to "Require PIN after" a certain amount of minutes. Would this be the setting I am looking for? What is the difference?

Thanks ahead of time.
Hello,

Im getting "The import com.sforce.soap.enterprise.SforceServiceLocator cannot be resolved" and "The import com.sforce.soap.enterprise.SoapBindingStub cannot be resolved" from the two bolded declarations below. Have they been deprecated?

import com.sforce.soap.enterprise.LoginResult;
import com.sforce.soap.enterprise.SessionHeader_element;
import com.sforce.soap.enterprise.fault.ExceptionCode;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.enterprise.SforceServiceLocator;
import com.sforce.soap.enterprise.SoapBindingStub;


All suggestions are appreciated. Thanks.
Im struggling with the syntax for pulling out the Person Accounts related to the Account. Any ideas what I am doing incorrectly?

Select a1.Name, a1.Person_Parent_Account__c, (Select Person_Parent_Account__r.PersonEmail, Person_Parent_Account__r.PersonHomePhone, Person_Parent_Account__r.PersonMobilePhone, Person_Parent_Account__r.PersonMailingLongitude, Person_Parent_Account__r.PersonMailingLatitude, Person_Parent_Account__r.PersonMailingCountry, Person_Parent_Account__r.PersonMailingPostalCode, Person_Parent_Account__r.PersonMailingState, Person_Parent_Account__r.PersonMailingCity, Person_Parent_Account__r.PersonMailingStreet, Person_Parent_Account__r.FirstName, Person_Parent_Account__r.LastName From Accounts)
from Account a1
where a1.ID = {!acct.Id}
Im having trouble getting the Financial_Account__c lookup field to display properly on my visualforce page. I am loading a wrapper class that contains Financial_Account_c and Holding_c. The Holding__c object has a lookup on it to Financial_Account_c. Im unable to get the field to display like it should as an inputField through Holding_c.Financial_Account__c nor directly to Financial_Account__c. All suggestions are appreciated.

Controller

public class ctrl {

    public list<holdingsWrapper> holdingList {get;set;}
    public list<Holding__c> holdingResults {get;set;}

    public ctrl(){
        this.init();
    }

    private void init(){

        holdingList = new list<holdingsWrapper>();
        User advisorRec = new User();

        String mhQuery = 'SELECT Name, ';
        mhQuery += 'Financial_Account__c, ';
        mhQuery += 'Advisor_ID__c ';
        mhQuery += 'FROM Holding__c ';

        holdingResults = Database.query(mhQuery);

        for(Holding__c m : holdingResults)
        {
            holdingList.add(new holdingsWrapper(m.Financial_Account__r, m));
        }

    }

    public class holdingsWrapper
    {
        public Financial_Account__c fa {get; set;}
        public Holding__c maho {get; set;}

        public holdingsWrapper(Financial_Account__c a, Holding__c mh)
        {
            fa = a;
            maho = mh;
        }
    }

}

Visualforce Page
 
<apex:page controller="ctrl" title="Financial Accounts" sidebar="false">

<apex:form id="myMHForm">
    <apex:outputPanel id="formPanel" layout="inline">

        <apex:pageBlock title="Financial Accounts" id="muselectedlist">

            <apex:pageBlockTable value="{!mhList}" var="mhItem" id="pgTable1">

                <apex:column headerValue="Financial Account" id="movetoaccount">
                    <apex:inputField value="{!mhItem.fa}" />
                    <!-- <apex:inputField value="{!mhItem.maho.Financial_Account__c}" /> -->
                </apex:column>
            </apex:pageBlockTable>

        </apex:pageBlock>

    </apex:outputPanel>
    </apex:form>

</apex:page>

ISSUE 1: The following does not allow me to save my VF page:
 
<apex:inputField value="{!mhItem.fa}" />
 
ERROR: Save error: Could not resolve the entity from value binding '{!mhItem.fa}'. can only be used with SObjects, or objects that are Visualforce field component resolvable. line 0 Force.com save problem

ISSUE 2: The following version saves, but only displays text and NOT the input field with the magnify glass:
 
<apex:inputField value="{!mhItem.maho.Financial_Account__c}" />

How do I get the field to display properly?

All suggestions are appreciated!
Hello,

We are using the Partner WSDL in our C# integration with Salesforce and we are receiving the following error when trying to update more than 200 records: 

Error updating Contact: EXCEEDED_ID_LIMIT: record limit reached. cannot submit more than 200 records into this call

How do we go about increasing this number? Is it possible or are we stuck with 200 records?

Thanks ahead of time for your resonse.
Hi all,

We were researching with the new enhanced notes feature prior to the Winter '17 release and I believe we saw the ability to add custom fields to the ContentNote object. But since the last release adding custom fields seems to no longer be an option.  Does anyone know why this didn't make it into Winter?

Thanks ahead of time!
Hi all,

Is it possible to give a 3rd party application access to a custom webservice without giving them access to the standard API? 

To give a little background on my project. Users will use their Salesforce credentials to login and register on one of our sister company's websites. Once they have logged into the site using their Salesforce credentials, the user needs the ability to pull down Salesforce data they own, such as customer information. 

What we have built for this works great, but the issue is being able to restrict the users to the custom service. Our security team his holding up this project because of the additional access to the standard api.

Any thoughts on how to limit access to the custom service only?



 
Hello,

Is it possible to enforce a Session Timeout for Salesforce1 users?  I see under Setup-->Connected Apps-> Salesforce1 --> Mobile Integration there are settings for having a PIN and being able to "Require PIN after" a certain amount of minutes. Would this be the setting I am looking for? What is the difference?

Thanks ahead of time.
Im struggling with the syntax for pulling out the Person Accounts related to the Account. Any ideas what I am doing incorrectly?

Select a1.Name, a1.Person_Parent_Account__c, (Select Person_Parent_Account__r.PersonEmail, Person_Parent_Account__r.PersonHomePhone, Person_Parent_Account__r.PersonMobilePhone, Person_Parent_Account__r.PersonMailingLongitude, Person_Parent_Account__r.PersonMailingLatitude, Person_Parent_Account__r.PersonMailingCountry, Person_Parent_Account__r.PersonMailingPostalCode, Person_Parent_Account__r.PersonMailingState, Person_Parent_Account__r.PersonMailingCity, Person_Parent_Account__r.PersonMailingStreet, Person_Parent_Account__r.FirstName, Person_Parent_Account__r.LastName From Accounts)
from Account a1
where a1.ID = {!acct.Id}
Hi everyone,

Im stumped on an issue and could use some guidance from the community. So to begin, Ive followed the steps out lined in the post here:

http://bobbuzzard.blogspot.com/2015/07/lightning-components-and-custom-apex.html

There I was able to create and initialize my Custom Class and its properties successfully. Now Im trying to update those custom class values in the JS Controller/Helper when a client side action (onblur) occurs, but I am running into a "Cannot read property" error when trying to SET the value of the custom class properties. So referring to Bob's example, I basically want to do this when an event occurs...

component.set('v.counts.numContacts', 50);

..but this returns the following error...

Action failed: c:Component_Calculator$controller$updateTotals[Cannot read property 'numContacts' of null]

Im in the process of creating a lightning component that will preload values on a calculator/estimating tool of sorts. So once the values are initially loaded I want to allow the user to be able to modify the preloaded values that in turn adjusts the total values. All of the values are held within the Custom Class. 

All replys are appreciated. Thanks ahead of time.
  • September 28, 2018
  • Like
  • 0
I am trying to use  ui:inputDate  in our lightning component and noticed quite annoying behaviour of DatePicker. When you first time attempt to use field with ui:inputDate the page jumps. On second attempt, it works perfectly. 
I found the same problem with ui:inputDate when I tried to create New Task in Opportunity.
To reproduce it you need to put a scroll bar at top position on an Opportunity page.
User-added image
After that choose Due Date and the page jumps.
User-added image

Is it a bug?
Hi all,

I have a lightning component that displays a list of records. On each of the records I have a button group and each button needs to perform an action on that particular record. So my question is, how do I pass (or go get) the object record or the record ID to the JS controller?

Heres is my component.cmp...
<aura:iteration items="{!v.timeline.entries}" var="entry">
	<li class="slds-timeline__item" id="alertItem"><!-- {!'alertItem_' + entry.feedItemId}-->
		
		<div class="slds-media slds-media--reverse">
			<div class="slds-media__figure">
				<div class="slds-timeline__actions">
					 <!--button group - start-->
					
					<div class="slds-button-group" role="group">
					  <button class="slds-button slds-button--icon-border" onclick="{!c.showModal}">
						<c:BBsvg class="{!'slds-button__icon'}" xlinkHref="{!'/resource/BB_SLDS091/assets/icons/utility-sprite/svg/symbols.svg#edit'}" />
						<span class="slds-assistive-text">Edit</span>
					  </button>
					  <button class="slds-button slds-button--icon-border" onclick="{!c.dismissAlert}">
						<c:BBsvg class="{!'slds-button__icon'}" xlinkHref="{!'/resource/BB_SLDS091/assets/icons/utility-sprite/svg/symbols.svg#clear'}" />
						<span class="slds-assistive-text">Dismiss</span>
					  </button>
					  <button class="slds-button slds-button--icon-more" onclick="{!c.showModal}">
						<c:BBsvg class="{!'slds-button__icon'}" xlinkHref="{!'/resource/BB_SLDS091/assets/icons/utility-sprite/svg/symbols.svg#clock'}" />
						<span class="slds-assistive-text">Snooze</span>
					  </button>
					</div>
					
					<!--button group - end-->
					
				</div>
			</div>
			<!-- more about the record resides here -->
		</div>
	</li>
</aura:iteration>
Here is my controller.js...
({

    showModal : function(component, event, helper) {
    	document.getElementById("backGroundSectionId").style.display = "block";
    	document.getElementById("snoozeSectionId").style.display = "block";
    },
    dismissAlert : function(component, event, helper) {
		//update record as dismissed - how do I pull in the specific record id from the list in the UI?
    	document.getElementById("alertItem").style.display = "none";
    },
    saveRecord : function(component, event, helper) {
    	//save changes to the record
    }
})

All suggestions are appreciated. Thanks!
 
Hi all,

Hoping you all can help me. Im trying to dynamically display (include) X number of visual force pages on a single parent page. Im getting the following error when I try to save the VF code below:
 
<apex:repeat value="{!strings}" var="str" id="theRepeat"> 
	<apex:include pageName="{!str}"/>
</apex:repeat>
...
public String[] getStrings() {
        return new String[]{'pagename1','pagename2'};
}
...

ERROR:
Result: [COMPILE FAILED]: (MyDashboard) Unknown property 'ctrl_MyPage.str'  (Line: 1, Column: -1)

All suggestions are appreciated.

Thanks!






 
Hi all,

Is it possible to give a 3rd party application access to a custom webservice without giving them access to the standard API? 

To give a little background on my project. Users will use their Salesforce credentials to login and register on one of our sister company's websites. Once they have logged into the site using their Salesforce credentials, the user needs the ability to pull down Salesforce data they own, such as customer information. 

What we have built for this works great, but the issue is being able to restrict the users to the custom service. Our security team his holding up this project because of the additional access to the standard api.

Any thoughts on how to limit access to the custom service only?



 
Hello,

Ive created a custom REST webservice within Salesforce.com. This webservice will be consumed by users from a 3rd Party website that register on that site with their Salesforce.com credentials. I would like to allow users to consume my custom webservice but do not want to give them free reign of all data they own via the Salesforce.com APIs in the process. This is due to the sensitivity of some of the information that we do not want to provide via the custom web service. So I could use some advice on how best to accomplish this, here's what I have done so far..

1. Ive created a Connected App that uses OAuth for authentication and allowing the following scopes..
  • Access your basic information (id, profile, email, address, phone)
  • Perform requests on your behalf at any time (refresh_token, offline_access)
2. Ive created a custom apex class that defines the REST service and given permission to this class to the proper profiles.

What steps do I need to perform to make sure the users only have access to the REST service and not all data?

Thank you for your help. All suggestions are appreciated!

I have created a Connected App so that the 
Ive created a single custom Rest service that Im trying to use to return multiple sObject types with. Im using cURL to verify that the service is working. The issue Im running into is occuring when I pass more than one parameter to the service.

This works:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=a -H 'Authorization: Bearer access token'

This does not work:
curl https://cs1.my.salesforce.com/services/apexrest/myService?type=b&id=001 -H 'Authorization: Bearer access token'

and returns..
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

Why would the second parameter cause this type of error?


 
Im having trouble getting the Financial_Account__c lookup field to display properly on my visualforce page. I am loading a wrapper class that contains Financial_Account_c and Holding_c. The Holding__c object has a lookup on it to Financial_Account_c. Im unable to get the field to display like it should as an inputField through Holding_c.Financial_Account__c nor directly to Financial_Account__c. All suggestions are appreciated.

Controller

public class ctrl {

    public list<holdingsWrapper> holdingList {get;set;}
    public list<Holding__c> holdingResults {get;set;}

    public ctrl(){
        this.init();
    }

    private void init(){

        holdingList = new list<holdingsWrapper>();
        User advisorRec = new User();

        String mhQuery = 'SELECT Name, ';
        mhQuery += 'Financial_Account__c, ';
        mhQuery += 'Advisor_ID__c ';
        mhQuery += 'FROM Holding__c ';

        holdingResults = Database.query(mhQuery);

        for(Holding__c m : holdingResults)
        {
            holdingList.add(new holdingsWrapper(m.Financial_Account__r, m));
        }

    }

    public class holdingsWrapper
    {
        public Financial_Account__c fa {get; set;}
        public Holding__c maho {get; set;}

        public holdingsWrapper(Financial_Account__c a, Holding__c mh)
        {
            fa = a;
            maho = mh;
        }
    }

}

Visualforce Page
 
<apex:page controller="ctrl" title="Financial Accounts" sidebar="false">

<apex:form id="myMHForm">
    <apex:outputPanel id="formPanel" layout="inline">

        <apex:pageBlock title="Financial Accounts" id="muselectedlist">

            <apex:pageBlockTable value="{!mhList}" var="mhItem" id="pgTable1">

                <apex:column headerValue="Financial Account" id="movetoaccount">
                    <apex:inputField value="{!mhItem.fa}" />
                    <!-- <apex:inputField value="{!mhItem.maho.Financial_Account__c}" /> -->
                </apex:column>
            </apex:pageBlockTable>

        </apex:pageBlock>

    </apex:outputPanel>
    </apex:form>

</apex:page>

ISSUE 1: The following does not allow me to save my VF page:
 
<apex:inputField value="{!mhItem.fa}" />
 
ERROR: Save error: Could not resolve the entity from value binding '{!mhItem.fa}'. can only be used with SObjects, or objects that are Visualforce field component resolvable. line 0 Force.com save problem

ISSUE 2: The following version saves, but only displays text and NOT the input field with the magnify glass:
 
<apex:inputField value="{!mhItem.maho.Financial_Account__c}" />

How do I get the field to display properly?

All suggestions are appreciated!
Hello,

We are using the Partner WSDL in our C# integration with Salesforce and we are receiving the following error when trying to update more than 200 records: 

Error updating Contact: EXCEEDED_ID_LIMIT: record limit reached. cannot submit more than 200 records into this call

How do we go about increasing this number? Is it possible or are we stuck with 200 records?

Thanks ahead of time for your resonse.
Hello,

I am having trouble getting to the next step with lead conversion, specifically with bulk lead conversions in my .Net integration. How do I bulk them together using the Partner API? Here's what I have so far for lead conversion...as well as what Im using for my working insert operation for comparison. Thanks ahead of time for the assistance.

        public LeadConvertResult[] performLeadConvert(LeadConvert[] leadsToConvert)
        {
            LeadConvertResult[] results = new LeadConvertResult[leadsToConvert.Length];

            results = binding.convertLead(leadsToConvert);
           
            return results;
        }

Working insert method...

public List<SaveResult> performInsert(List<sObject> sObjectRecs)
        {
            List<SaveResult> results = new List<SaveResult>();
            if (sObjectRecs.Count <= 200)
            {
                results = binding.create(sObjectRecs.ToArray()).ToList();
            }
            else
            {
                Int32 i = 0;
                List<sObject> iterSObjects = new List<sObject>();
                foreach (sObject s in sObjectRecs)
                {
                    if (i < 200)
                    {
                        iterSObjects.Add(s);
                        i++;
                    }
                    else
                    {
                        results.AddRange(binding.create(iterSObjects.ToArray()).ToList());
                        i = 0;
                        iterSObjects = new List<sObject>();
                    }
                }
                results.AddRange(binding.create(iterSObjects.ToArray()).ToList());
            }
            return results;
        }