You need to sign in to do that
Don't have an account?
Nasir
how to create a record from one object to other object by using java script and web services.
Hi
I have object called "Sales order" and "week management".Week management have some records.i have created a button on week management called "create sales order".When a user select a record in weekmanagement by clicking it,and then click "Create sales order" then record in a sales order record is created in sales order object.
I have to do this by using java script coz i had choosed use javascript to create that button. and i have to use web services.
How can i do that.
Plz help
Nasir
Hi Nasir,
write the creating record logic into button click javascript only.
if you are using web service for doig that , then you can directaly call web service from javascript.
All Answers
do it using apex.
call <action:function> on onClick of that button through javascript.
Then use future method to make webservice call & make @future(callout=true).
i had created a custom button in week management object and used CONTENT SOURCE=ON CLICK JAVA SCRIPT,
then i had used this code :
after this i created a apex classfor web services...
now when i click the record in week management and click the button sales order its should create a record in the sales order object.
Plz help
then whats problem r u facing right now?
i want to write a controller for the web services.I am not able to write it.
Can u please help me doin that.
Thanks
NAsir
Hi Nasir,
write the creating record logic into button click javascript only.
if you are using web service for doig that , then you can directaly call web service from javascript.
Hi ,
I have done the same way as u had mentioned.
But can i use VF and apex controller to do the same.I will use extension and will create a button and will write the custom logic.
Thanks
NAsir
yes you can
and actually its a better way of doing it.
Create VF Page & use it on Custom button you have created on object.