• Chris Aldridge
  • NEWBIE
  • 30 Points
  • Member since 2013
  • Lead Consultant/Director
  • Silver Softworks


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hello - I've completed the challenge for Using Formula Fields in Trailhead and I can see, by creating a new Case, that my formula is working correctly. However, when I click the Check Challenge button, I get the message, "Challenge not yet complete... here's what's wrong: 
The 'Days_Since_Last_Update__c' formula field did not return the correct number of days between an Account’s Last Activity Date and today"

My formula is:  TODAY() -  Last_Activity_Date__c

User-added image

User-added image

User-added image

Can you please help me figure out how to get past this? Thanks.

 

Hi All,

 

Just a quick question regarding generating wsdl files from Apex classes.

 

I would like to make some changes to how wsdl classes are generated from my Apex classes.

 

I am from a WCF (.Net) background.  In .Net, I can add attributes to properties/classes etc to make the WSDL generate in a particular way.  I can't find any reference to any functionality along these lines in Salesforce.  

 

For instance, let's say I have a basic service that accepts a single object like this, using the document literal pattern:

 

global class HelloWorldRequest
{
     webservice string myName;
}

 

In my wsdl, I would have something like this:

<xsd:element name="myName" minOccurs="0" type="xsd:string" nillable="true"/>

 

That's great.

 

However, let's say that I want to make myName mandatory.

 

In .Net, I could decorate the code something like this (apologies for the .Net/Apex mash up)

 

global class HelloWorldRequest
{

     [Datamember(required=true)]
     webservice string myName;
}

 

This would change my wsdl to look like this:

<xsd:element name="myName" minOccurs="1" type="xsd:string" nillable="false"/>

 

Anybody consuming my wsdl would easily be able to see that this is a mandatory field.  Also, if they did not provide a value in this field my web service (.Net version) would reject the request before processing it, preventing any dodgy validation issues.

 

So, to get to my actual question...

 

Is there a way in Apex/Salesforce that I can change my classes to affect the way the wsdl is generated?  

 

The above is a fairly basic example.  I'm working with someone at the moment whose system that will be consuming my wsdl file is pretty fussy.  We are having issues with namespaces which basically mean that I've had to move all of my request/response classes into my main web service class.  Not a massive big deal, but again, in my previous .Net life I could simply annotate my classes to change namespaces/object names etc.

 

If this doesn't currently exist, are there any plans for the future?  Just being able to flag fields as mandatory at the wsdl level would be great.

Hello - I've completed the challenge for Using Formula Fields in Trailhead and I can see, by creating a new Case, that my formula is working correctly. However, when I click the Check Challenge button, I get the message, "Challenge not yet complete... here's what's wrong: 
The 'Days_Since_Last_Update__c' formula field did not return the correct number of days between an Account’s Last Activity Date and today"

My formula is:  TODAY() -  Last_Activity_Date__c

User-added image

User-added image

User-added image

Can you please help me figure out how to get past this? Thanks.

 
We have a very interesting and a challenging requirement from one of our clients, following is the scenario:

Consider there is a customer Cust-A.
Cust-A can refer one or more customers. Say, Cust-A refers Cust-B and Cust-C.
Further Cust-B and Cust-C can refer one or more customers.
This chain of referal can go upto any level.

Now, on each customer record we want to calculate total number of refered customers in the entire chain below that customer.

Has anyone come accross such a scenario or have any suggestion on how this can be implemented.

All suggestions are welcome and appriciated.

Thanks,
Vijay

Hi All,

 

Just a quick question regarding generating wsdl files from Apex classes.

 

I would like to make some changes to how wsdl classes are generated from my Apex classes.

 

I am from a WCF (.Net) background.  In .Net, I can add attributes to properties/classes etc to make the WSDL generate in a particular way.  I can't find any reference to any functionality along these lines in Salesforce.  

 

For instance, let's say I have a basic service that accepts a single object like this, using the document literal pattern:

 

global class HelloWorldRequest
{
     webservice string myName;
}

 

In my wsdl, I would have something like this:

<xsd:element name="myName" minOccurs="0" type="xsd:string" nillable="true"/>

 

That's great.

 

However, let's say that I want to make myName mandatory.

 

In .Net, I could decorate the code something like this (apologies for the .Net/Apex mash up)

 

global class HelloWorldRequest
{

     [Datamember(required=true)]
     webservice string myName;
}

 

This would change my wsdl to look like this:

<xsd:element name="myName" minOccurs="1" type="xsd:string" nillable="false"/>

 

Anybody consuming my wsdl would easily be able to see that this is a mandatory field.  Also, if they did not provide a value in this field my web service (.Net version) would reject the request before processing it, preventing any dodgy validation issues.

 

So, to get to my actual question...

 

Is there a way in Apex/Salesforce that I can change my classes to affect the way the wsdl is generated?  

 

The above is a fairly basic example.  I'm working with someone at the moment whose system that will be consuming my wsdl file is pretty fussy.  We are having issues with namespaces which basically mean that I've had to move all of my request/response classes into my main web service class.  Not a massive big deal, but again, in my previous .Net life I could simply annotate my classes to change namespaces/object names etc.

 

If this doesn't currently exist, are there any plans for the future?  Just being able to flag fields as mandatory at the wsdl level would be great.