• Ariel Siler 6
  • 14 Points
  • Member since 2018

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2
I have an anonymous site to make unauthenticated rest requests that activates my apex class method;
everything was worked fine when i called the following endpoint:
And it activated the following apex:
global with sharing class MyEndpointName {
    global static Integer xxx() { ... }
But after moving the class into a new managed package the endpoint stopped working.
All the documentation talking about apex rest in managed packaged didn't talk about how it affects the url on anonymous requests made to a site.
they all sort of say to add the namespace prefix as the beginning sub domain like this:
or to add it before the endpoint name like this:
but none of them talks about how to handle sites like my case.
I tried all possible variations i could think of like:
and more adding the __ but none worked.

Eventually i got it working by adding a wildcard (*) to my urlMapping like this:
global with sharing class MyEndpointName {
    global static Integer xxx() { ... }

and then the following endpoint started working:

The thing is that i'm worried about that wildcard because i don't understand why it works and the possible consequences.
when i use the following endpoint:
it doesn't work which is good, but stil i prefer to put in my urlMapping something implicit that will work.

when i tried to change the urlMapping into this:
global with sharing class MyEndpointName {
    global static Integer xxx() { ... }
It didn't work for that endpoint,
i need guidance regarding DataLoader any one please suggest to complete Challenge 8
Hi All,

I Want to give Some Validation to File Extemsion...So that it should accept particular file Format.....

i have Written these
 function check(obj) { 
            var path = obj.value;
            var ext = path.substring(path.lastIndexOf('.') + 1);
            if(ext !="pdf")
                obj.value = null;
                window.alert("File can be only of type : pdf, doc, docx, xls, xlsx, ppt, pptx, pps, ppsx ");
                return false;
but its not Working..i want to give validation for 5-6 file Format...how it will be Written,, Kindly Suggest.