• Bhupendra yadav
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hey,

Is there any syntex to pass the parameter along with button click event to client side JS controller from component? just the way we have in VF?

<apex:commandButton value="click Me" action="{!buttonClicked}">
     <apex:param name="parameterName" value="param1" assignTo="{!param}"/>
</apex:commandButton>


On the similar line is there anything like below?

<ui:button press='{!c.buttonClicked}'>
   <ui:param value='pram1'/>
</ui:button>


 
SFDC documentatoin says that html pass through worksfork with outputfield, however whenever we bind the outputfield with any currency type field and try to pass through attribute it doen'st work. it behave in following way. Am I missing something here ?

Controller

public CObj__c CObj {get;set;}

VF page

<apex:outputField value = '{!CObj.Amount__c}' html-passedValue='XYZ'></apex:outputField>

Generated html
<span id="j_id0:j_id1:j_id14">$20</span>


Hence you can see that the pass through attribute is not generated. However if you change the binding variable to any type other then Currency, pass through will start working. as shown below.
SFDC documentatoin says that html pass through worksfork with outputfield, however whenever we bind the outputfield with any currency type field and try to pass through attribute it doen'st work. it behave in following way. Am I missing something here ?

Controller

public CObj__c CObj {get;set;}

VF page

<apex:outputField value = '{!CObj.Amount__c}' html-passedValue='XYZ'></apex:outputField>

Generated html
<span id="j_id0:j_id1:j_id14">$20</span>


Hence you can see that the pass through attribute is not generated. However if you change the binding variable to any type other then Currency, pass through will start working. as shown below.
Hello,

I wish to include :-
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
extenal library for Google maps in a lightning component.

It doesnt allow me to do so , it gives me the following error:-
Content Security Policy: The page's settings blocked the loading of a resource at http://maps.google.com/maps/api/js?sensor=false ("script-src https://ap1.lightning.force.com https://ssl.gstatic.com chrome-extension: 'unsafe-eval' 'unsafe-inline'").

I tried loading this script asynchronously as well , by creating dynamic <script> tag and loading the src. Still doesnt work.

Kindly let me know how I can get Google Maps to work in a Lightning Component.

Thanks in advance
 

Hello,

 

I am getting an error when I use JavaScript remoting and have my URLReWriter turned on on my Force.com SIte.  The error does not occur when using JavaScript Remoting with the URL ReWriter turned off.

 

The error is as follows

 

Exception Error parsing json response: 'Unexpected token <'. Logged in? 

 

I'm confused as to why this is occuring. If I have no checks for being logged in in my URL ReWriter (or visualforce page) why should this occur?

 

Has anyone ever come across something similar to this before?  I noted  the following http://salesforce.stackexchange.com/questions/4112/possible-oauth-remote-action-bug but in my case I am not using authentication on my site for the test page that I created & I'm wondering why it mentions "login".

 

Thanks in advance for any help on this.

 

Hi,

 

Today I encountered a problem that I can't explain:

 

I got a record 'recA' shared with a user 'userU' through manual sharing (read-only)

 

When I request the UserRecordAccess object in a 'without sharing' class, all works fine:

[SELECT RecordId, HasEditAccess FROM UserRecordAccess WHERE UserId = :userUid AND RecordId = :recAid LIMIT 1]

=> {RecordId=a0kM0000000jWMxIAM, Id=000000000000000AAA, HasEditAccess=false}

 

 But when I execute the same code in a 'with sharing' class, i get 

 

{RecordId=a0kM0000000jWMxIAM, Id=000000000000000AAA, HasEditAccess=true}  //HasEditAccess should be false}

 

 

It seems like a bug, because when I do this query:

 

[SELECT RecordId FROM UserRecordAccess WHERE UserId = :userUid AND RecordId = :recAid AND HasEditAccess = true LIMIT 1]

 I get not results...

 

 

Please let me know if you have already encountered some problems with the UserRecordAccess object.

 

I'm in API 26

 

Thanks

 

 

Any thoughts on how to handle UTF-8/Unicode characters in email addresses in Salesforce? That seems to be the one field (or one of the few fields) that doesn't allow UTF-8. I know international email addresses are still experimental but with the recent approval of international domain names (IDNs), it seems inevitable.

 

For now, we're thinking of just converting them to Punycode to get them down to the ascii character set and we can always convert them back to utf-8 if/when salesforce allows that.

 

This is primarily for Leads that are automatically pushed into Salesforce from the registration scripts on our external site. We're adding international support, so we're exploring what is needed to support users from other countries (non-english names, addresses, etc.).

 

And while we could restrict email addresses to ascii characters only, it seems a shame to have to limit our capabilities and our user base on the front end, just because Salesforce can't handle IDN email addresses (or, alternatively, to not push those registrations into Salesforce as Leads).

 

(I realize this could cause problems if people try to send email to these folks from within Salesforce, though.)

 

Thoughts?

 

---Lawrence

 

Any thoughts on how to handle UTF-8/Unicode characters in email addresses in Salesforce? That seems to be the one field (or one of the few fields) that doesn't allow UTF-8. I know international email addresses are still experimental but with the recent approval of international domain names (IDNs), it seems inevitable.

 

For now, we're thinking of just converting them to Punycode to get them down to the ascii character set and we can always convert them back to utf-8 if/when salesforce allows that.

 

This is primarily for Leads that are automatically pushed into Salesforce from the registration scripts on our external site. We're adding international support, so we're exploring what is needed to support users from other countries (non-english names, addresses, etc.).

 

And while we could restrict email addresses to ascii characters only, it seems a shame to have to limit our capabilities and our user base on the front end, just because Salesforce can't handle IDN email addresses (or, alternatively, to not push those registrations into Salesforce as Leads).

 

(I realize this could cause problems if people try to send email to these folks from within Salesforce, though.)

 

Thoughts?

 

---Lawrence