Thanks Sumit
can i get the function defination for following function
delegator.getNextSeqId("HelloStud");
Thanks again.
On Wed, Oct 22, 2008 at 6:49 PM, Sumit Pandit
<[EMAIL PROTECTED]> wrote:
> If you are provide error message also then it will be helpful.
> Also please try to provide much information with the problem.
>
>
> --
> Thanks and Regards
> Sumit Pandit.
> HotWaxMedia, Inc
> http://www.hotwaxmedia.com
>
> On Oct 22, 2008, at 2:40 PM, Vinayak Yadav wrote:
>
>> I tried following code but it is not working. It is giving error while
>> compiling.
>> Please Help Us.
>>
>> Thanks
>>
>>
>> try {
>> // String helloStudId = delegator.getNextSeqId("HelloStud");
>> // gets next available key for HelloPerson
>> //Debug.logInfo("helloStudId = " + helloStudId, module); //
>> prints to the console or console.log
>> GenericValue helloStud = delegator.makeValue("HelloStud",
>> UtilMisc.toMap("helloStudId", helloStudId)); //
>> create a GenericValue from ID we just got
>> helloTest.setPKFields(context); // move primary key fields
>> from input parameters to GenericValue
>>
>> // here make sure that context must contain a key with same name as
>> primary key of the Entity.
>>
>> helloTest.setNonPKFields(context); // move non-primary key
>> fields from input parameters to GenericValue
>> delegator.create(helloStud); // store the generic value, ie
>> persists it
>>
>> Map result = ServiceUtil.returnSuccess(); // gets standard
>> Map for successful service operations
>> result.put("helloStudId", helloStudId); // puts output
>> parameter into Map to return
>> return result; // return Map
>> } catch (GenericEntityException ex) { // required if you use
>> delegator in Java
>> return ServiceUtil.returnError(ex.getMessage());
>>
>> }
>
>