+ Start a Discussion
Rakesh KumarPRakesh KumarP 

The '# of Volunteers Still Needed' field on the 'Volunteer Shift' record is not working as expected .. How to resolve???

Hi All, I am having problem in resolving an error in the 'Customization Specialist superbadge' . The error message is 'The '# of Volunteers Still Needed' field on the 'Volunteer Shift' record is not working as expected'. I have tried all the options
i.e. IF( Desired_of_Volunteers__c - Shifts_Taken__c > 0, Desired_of_Volunteers__c - Shifts_Taken__c , 0) 

and Max(Desired_of_Volunteers__c - Shifts_Taken__c,0) also.
But no luck .So it's now no more fun!!  Kindly help me in solving this soon ...
SandhyaSandhya (Salesforce Developers) 
Hi,

Refer below link which has the solution as BestAnswer for same error.

https://developer.salesforce.com/forums/?id=9060G0000005X9HQAU
 
https://developer.salesforce.com/forums/?id=9060G0000005XD9QAM

Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
​Sandhya
 
Rakesh KumarPRakesh KumarP
Hello everone,

Yes I have tried using the above in my formula 
i.e. IF((Desired_of_Volunteers__c - Shifts_Taken__c) > 0, Desired_of_Volunteers__c - Shifts_Taken__c, 0)

But still the error persists. Is there anything that I am missing here apart from the formula field to be created.. Kindly guide me.

Thanks,
Rakesh
Prince Sharma 5Prince Sharma 5
Hello,

This formula worked for me
Max((Desired_of_Volunteers__c - Shifts_Taken__c), 0)

I was able to solve that issue by enabling the field level security permission on Shift End Date field on  Volunteer Shift Object.

This worked for me.

Please mark this answer as best if it helps so that others facing the same issue
will find it useful.
Mykola Hlynka 32Mykola Hlynka 32

@Rakesh KumarP

The '# of Volunteers Still Needed' field on the 'Volunteer Shift' record is not working as expected

This is The true Formula:

IF((Desired_of_Volunteers__c - Shifts_Taken__c) > 0, Desired_of_Volunteers__c - Shifts_Taken__c, 0)

Check the dependent fields bottom.

User-added image
____________
User-added image
_________
User-added image

 

Rob Smith 25Rob Smith 25
I know this is odd folks, but I was in the position of many not being able to figure out my issue. I got into my debug logs and found that the checker was actually failing on this step:

Execute Anonymous: List<RecordType> rtypes = [SELECT Id FROM RecordType WHERE SObjectType='Account' AND Name='Volunteer Organization Account' LIMIT 1];

I had copied and pasted my record type name and had 'Volunteer Organization Account record type' instead of 'Volunteer Organization Account' and oddly, it produced this error. Once corrected, it sailed past the field itself. Hope this helps some people.
Fabio Wan-Dall 1Fabio Wan-Dall 1
I solve this problema changing the Label and API name of the 3 fieds related to this requirement, Like in this post https://trailblazers.salesforce.com/answers?id=9063A000000lSiSQAU
Rimon Mikhaiel 17Rimon Mikhaiel 17
Make sure that the API Name of the "Desired # of Volunteers" is "Desired_of_Volunteers__c"
anmi chanmi ch
Hi Rimon 
As you said I have tried changing the API name but still getting this error "
The 'Desired # of Volunteers' field is not the correct data type." can you help me with this error .
Sudha RamanSudha Raman
Anmi ch you cannot change the API name instead you need to delete the field and again redo the same.I also faced the similar issue .Deleting and redoing worked out.