• Caleb Kuester 35
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies

Hi!

I have created a webhook listener, but it seems that I see an "under construction" page instead of anything I might otherwise expect.

In sites, I have a URL created and it is active. There is also a visualforce page created to use as its active site home page. If I go to that site explicitly, via the URL link, it gives me the markup for that visualforce page.

Great.

The problem is that, in order for me to be able to use it, the url must be in the format of: org_url/services/apexrest/urlMapping. So that would be https://caleb-xxxxxxx.cs70.force.com/services/apexrest/urlmappingvalue

The site user has access to the Apex class and Visualforce page.

When I go to workbench's REST Explorer tool, it gives me exactly what I need, presumably because I'm authenticated into my org, but when I use the URL listed above, it says the site is  under construction.

My @HttpPost method returns some garbage string (intentionally) and that string is only returned in workbench.

I'm curious what I'm missing.

 

Hey guys.

Is this possible?

I understand the significance of converting the Lead record and how crucial the Account record is in the whole purpose for converting Lead records to begin with, but a structure that I am implementing has this requirement.

My solution would be to have a master Account record that would take the place of the created Account record (for the Opportunity and Contact's purposes) and delete the new Account record.

Checking with you guys to see if this is really necessary.

Also, as an aside, if I'm going to be overriding the standard lead conversion button, is there a more declarative approach than the creation of a Visualforce page, or Lightning Component to override?

Thanks in advance!

So Custom Metadata Type records must have the DeveloperName field populated by some kind of text. I don't want that field, but without a choice, I decided to use them in a way that is relevant to my case.

My records are for states, so I want my users to have the presence of mind to be able to spell them correctly, including case.

The only option I have is validation rule with regex.

Here is my rule:
 

NOT(REGEX(DeveloperName, "/Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Guam|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New\\sHampshire|New\\sJersey|New\\sMexico|New\\sYork|North\\sCarolina|North\\sDakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode\\sIsland|South\\sCarolina|South\\sDakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West\\sVirginia|Wisconsin|Wyoming|Washington\\sD.C./"))

The problem is the spaces. Any state that has a space fails validation.

I do not get a different result if I remove the \\s items and use TRIM(), or SUBSTITUTE(x, " ", "")

Has anybody else come across this?

Hi All,

 

Salesforce Lightning component we are using 
<aura:component access="Global"  implements="force:lightningQuickActionWithoutHeader,flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes,force:hasRecordId" >

we are using like above but salesforce security report we got result 

Issue Description
Events sent across namespace boundaries that include sensitive data not intended for consumption by another namespace. Unintentional leak of data across namespace boundary via improper configuration of events. Use properly scoped LWC custom events.
Finding 1 of 1
File
aura/FT_AccountabilityPreviewAction/FT_AccountabilityPreviewAction.cmp
Code
<aura:component implements="force:LightningQuickAction,forceCommunity:availableForAllPageTypes" access="Global">
Notes
Access attribute with value "global" allows your resource to be accessed outside your org. There are similar instances throughout the application, please fix it in all places.

we are getting this issue in How we can over come to these problems

 please support if any one know 

Thank you 

Surender Reddy 

 

 

Hi!

I have created a webhook listener, but it seems that I see an "under construction" page instead of anything I might otherwise expect.

In sites, I have a URL created and it is active. There is also a visualforce page created to use as its active site home page. If I go to that site explicitly, via the URL link, it gives me the markup for that visualforce page.

Great.

The problem is that, in order for me to be able to use it, the url must be in the format of: org_url/services/apexrest/urlMapping. So that would be https://caleb-xxxxxxx.cs70.force.com/services/apexrest/urlmappingvalue

The site user has access to the Apex class and Visualforce page.

When I go to workbench's REST Explorer tool, it gives me exactly what I need, presumably because I'm authenticated into my org, but when I use the URL listed above, it says the site is  under construction.

My @HttpPost method returns some garbage string (intentionally) and that string is only returned in workbench.

I'm curious what I'm missing.

 

I have a question that I'm having a hard time explaining and solving.
So for starters, I've built an aura component where I want to use Lightning:datatable to enter the Amount of an Opportunity that looks like this:

(This is not the actual component I want to use, but for this one I've built an example for better explanation.)

Opportunity.cmp

<aura:component controller="testController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <aura:attribute name="recordId" type="String"/>
    <aura:attribute name="data" type="Object"/>
    <aura:attribute name="columns" type="List"/>
    <aura:attribute name="errors" type="Object" default="[]"/>
    <aura:attribute name="draftValues" type="Object" default="[]"/>

    <aura:handler name="init" value="{!this}" action="{!c.init}" />
    <div style="height: 300px">
        <lightning:datatable
            columns="{! v.columns }"
            data="{! v.data }"
            keyField="Id"
            errors="{! v.errors }"
            draftValues="{! v.draftValues }"
            onsave="{! c.handleSaveEdition }"
        />
    </div>
</aura:component>


OpportunityController.js:
({
	init : function(cmp, event, helper) {
        console.log('no');
		cmp.set('v.columns', [
            {label: 'Opp Name', fieldName: 'Name', type: 'Text', editable: false },
            {label: 'Amount', fieldName: 'Amount', type: 'currency', typeAttributes: {currencyCode: { fieldName: 'CurrencyIsoCode' }}, editable: true}
        ]);
        
        helper.fetchOpps(cmp);
	},
    
    handleSaveEdition: function (cmp, event, helper) {
        var draftValues = event.getParam('draftValues');
		console.log(draftValues);
        helper.saveEdition(cmp, draftValues);
    }
})


OpportunityHelper.js:
({
    fetchOpps : function(cmp) {
        let getOpp = cmp.get('c.getOpp');
        getOpp.setParams({OppId : cmp.get('v.recordId')});
        getOpp.setCallback(this, function(response){
            if(response.getState() == 'SUCCESS'){
                console.log(response.getReturnValue());
                cmp.set('v.data', response.getReturnValue());
            }
        });
        $A.enqueueAction(getOpp);
    },
    
    saveEdition : function(cmp, draftValues) {
        var self = this;
        console.log(draftValues);
        let saveOpps = cmp.get('c.saveOpps');
        saveOpps.setParams({opps : draftValues});
        saveOpps.setCallback(this, function(res){
            if(res.getState() == 'SUCCESS'){
                cmp.set('v.errors', []);
                cmp.set('v.draftValues', []);
                self.fetchOpps(cmp);
            } else if (res.getState() === "ERROR") {
                var errors = response.error;
                console.error(errors);
            }
        });
        $A.enqueueAction(saveOpps);
    }
})



Apex Controller = testController.apxc
public class testController {
    @AuraEnabled
    public static List<Opportunity> getOpp(String OppId){
        return [SELECT Id, Name, CurrencyIsoCode, FORMAT(Amount) FROM Opportunity WHERE Id =: OppId];
    }
    
    @AuraEnabled
    public static void saveOpps(List<Opportunity> opps){
        System.debug(opps);
        update opps;
    }
}


Organization information:
Currency: SEK

Enabled currencies: SEK and USD, both having 2 decimal places.

So the issue I have is that this component is behaving odd.
My locale is Swedish, the Opportunity Currency is set to USD.


When I edit the amount field to be 123,45 and save, the saved value is: 12 345,00 US$.

Why is that?
One more question, if I set the value to 123,4 it gets turned into 123,40 US$ but the value is saved as 12,00 US$.


The reason to why I'm using FORMAT(Amount) is because I would like to have the value to be the local currency setting for the record, even when using multi-currencies, but for now this won't let me use decimals for this.

 

Images for trying to explain further:

The amount start at 12,00 US$
So the Opporunity starts with an Amount of 12,00 US$.
I want to set it to 12,34:

User-added image
After saving and retrieving record from database again:
User-added image

Hey guys.

Is this possible?

I understand the significance of converting the Lead record and how crucial the Account record is in the whole purpose for converting Lead records to begin with, but a structure that I am implementing has this requirement.

My solution would be to have a master Account record that would take the place of the created Account record (for the Opportunity and Contact's purposes) and delete the new Account record.

Checking with you guys to see if this is really necessary.

Also, as an aside, if I'm going to be overriding the standard lead conversion button, is there a more declarative approach than the creation of a Visualforce page, or Lightning Component to override?

Thanks in advance!

So Custom Metadata Type records must have the DeveloperName field populated by some kind of text. I don't want that field, but without a choice, I decided to use them in a way that is relevant to my case.

My records are for states, so I want my users to have the presence of mind to be able to spell them correctly, including case.

The only option I have is validation rule with regex.

Here is my rule:
 

NOT(REGEX(DeveloperName, "/Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Guam|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New\\sHampshire|New\\sJersey|New\\sMexico|New\\sYork|North\\sCarolina|North\\sDakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode\\sIsland|South\\sCarolina|South\\sDakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West\\sVirginia|Wisconsin|Wyoming|Washington\\sD.C./"))

The problem is the spaces. Any state that has a space fails validation.

I do not get a different result if I remove the \\s items and use TRIM(), or SUBSTITUTE(x, " ", "")

Has anybody else come across this?

The server (through Webhook API) makes a HTTP POST request to my URL ( I can only set the URL on server ) with POST parameters whenever an event occours on the server side. I want to insert a record on custom object, reading POST Parameters.

 

Can someone explain What I need to do..

 

-Do i need to make a Public Web Service in Salesforce

-Does Anyone have a better idea.