0

I am less than a novice at this. I was able to piece together some javascript to enable a button on list view that would allow me to make selections of "students" and then mark them as "attended" by creating attendence records on the student object in mass. However, now I am running group edition for financial reasons and the button will not work. As I understand it, I need to use visualforce in order to do this, but I have no clue. Here is my javascript code, any help would be appreciated. Thanks

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")};
    var url = parent.location.href;
var records = {!GETRECORDIDS($ObjectType.Student__c)};
var CreateNewRecords = []; 
var answer = prompt("Enter a Date", "1/1/13");           
try
{

    if (records[0] == null)
    {
        alert("Please select at least one record to update.");
    } 
    else
    {
        for (var a=0; a<records.length; a++) 
        {
            var create_new_opportunity = new sforce.SObject("Attendance__c");

            create_new_opportunity.Date__c = sforce.internal.dateTimeToString(new Date(answer));
            create_new_opportunity.Student__c = records[a];
            CreateNewRecords.push(create_new_opportunity);
        }
        var result = sforce.connection.create(CreateNewRecords);
        if (result[0].success=='false')
        {
            alert(result[0].errors.message);
        }
        else
        {
            alert("records created successfully."); 
            location.reload(true);
        }

    }
}
catch(error)
{
    alert("Error In Attendance creation  = "+error);
}
0

You can't replicate this in Group Edition. It requires the API, which simply isn't available in Group Edition. Users will need to create new records manually.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.