You need to sign in to do that
Don't have an account?
denissis
Ideas Plsss
I have an object called "Lease".When i create a record in Lease it gets saved.I should have a button "Generate Office " in the record which automatically creates an office record which is exactly same as record created earlier in Lease In " office" all the fields which are there in "lease" are present and also they are formula fields I am in a confusion as i didnot understand d req properly or how do i need approach Do i need to visual force page for the button
What about a button on the page layout which executes javascript (remote APEX)?? This could be a sample:
{!requireScript("/soap/ajax/15.0/apex.js")}
{!requireScript("/soap/ajax/15.0/connection.js")}
var oID = sforce.apex.execute("OfficeGenerator","generateOffice",{Idnt:"{!Id }"});
if(oID == 'failed'){
alert("An error has occured, the Office could not be created! Please contact your administrator.");
} else {
alert("Generate Office failed");
}
And here the is the APEX class:
I've wrote the code down without testing ist .... so pls excuse any typos ....
Cheers,
--dirk
Hello,
Why don't you try a trigger, put a check box on the object if you check it and save it, trigger will create office record.
Let me know if you need any other information on this.
Thanks