You need to sign in to do that
Don't have an account?
dandante
being able to use new custom fields immediately
Hi,
I am building a Java salesforce app for a client. It is designed in such a way that the client can create their own forms, hosted at their own server, and then submit them to my app (which will be hosted elsewhere on their own server).
All the app does is create leads based on form input, it looks at the form items and figures out which fields to populate in the Lead object. So you could have a hundred different forms, all asking for different sets of fields, and the app would figure out how to save the leads. This part is not yet implemented but may use reflection.
We have told the client that it would be no problem for them to create custom fields, but now that I see how this is done, it does pose a problem. They can't just create a custom field and then include it in a form. These manual steps have to take place first:
-They notify me that they have created a new custom field
- I download the wsdl and run Wsdl2Java
- I don't have to change any of my own code because it is smart enough
to generate method calls by itself based on form item names.
- I recompile the app code, package it into a WAR,
- and redeploy that WAR on the remote server.
This is not really an acceptable solution. I'd like to give them an app that will just work. It looks like in the Ruby API, you can just pass a hash to the create statement, making all of the above steps unnecessary. Is there anything similar in the Java API?
Hope someone can help.
Thanks.
I am building a Java salesforce app for a client. It is designed in such a way that the client can create their own forms, hosted at their own server, and then submit them to my app (which will be hosted elsewhere on their own server).
All the app does is create leads based on form input, it looks at the form items and figures out which fields to populate in the Lead object. So you could have a hundred different forms, all asking for different sets of fields, and the app would figure out how to save the leads. This part is not yet implemented but may use reflection.
We have told the client that it would be no problem for them to create custom fields, but now that I see how this is done, it does pose a problem. They can't just create a custom field and then include it in a form. These manual steps have to take place first:
-They notify me that they have created a new custom field
- I download the wsdl and run Wsdl2Java
- I don't have to change any of my own code because it is smart enough
to generate method calls by itself based on form item names.
- I recompile the app code, package it into a WAR,
- and redeploy that WAR on the remote server.
This is not really an acceptable solution. I'd like to give them an app that will just work. It looks like in the Ruby API, you can just pass a hash to the create statement, making all of the above steps unnecessary. Is there anything similar in the Java API?
Hope someone can help.
Thanks.
When you create an sobject for update or create, you also specify key/value pairs in lieu of getters and setters.
Check out the sample code for the java partner samples.
http://www.sforce.com/us/downloads/PartnerSamples7.0.zip