6 Replies Latest reply: Jan 30, 2013 3:42 AM by user7199962 RSS

    Can anybody help which API use to create and update for resource

    user7199962
      Hi,

      I need API's in order to create and update the resource details.
      I want to update Roles ,groups receivables etc those are the tab in resource form.
      FMB name is JTFRSDEF.

      Regards,
      Javed Khan
        • 1. Re: Can anybody help which API use to create and update for resource
          user7199962
          Hi Folk,

          I got oracle note id 301237.1 in this I found below three API's which can be used create and update for resource roles and groups.

          jtf_rs_role_relate_pub.create_resource_role_relate
          jtf_rs_group_relate_pub.create_resource_group_relate

          However I am unable to update the group member roles through these API's.
          Can anybody give me idea about how I can update group member roles in groups tab of resource form.

          Regards,
          Javed Khan
          • 2. Re: Can anybody help which API use to create and update for resource
            shreevat
            Use JTF_RS_GROUP_MEMBERS_PUB.update_resource_group_members and JTF_RS_ROLE_RELATE_PUB.update_resource_role_relate.

            Thanks
            Shree
            • 3. Re: Can anybody help which API use to create and update for resource
              user7199962
              Hi Shree,

              Thanks for your response.
              I used the given API and it really worked for me.
              But it is not working as per my expectation.
              I am using this API to assign the similar roles and groups to newly created user using existing user.
              However when i am running my program ,it is assigning the groups to newly created user using existing user but it is deleting the groups from existing user.
              Please see my cursor and API input parameter which i am assigning to update the records.


              CURSOR cur_get_group_member1(p_ref_resource_id number)
              IS
              SELECT jtgv.group_id
              ,jtgv.group_number
              ,jtre.resource_number
              ,JTRM.RESOURCE_ID
              ,JTRM.GROUP_MEMBER_ID
              ,jtrm.OBJECT_VERSION_NUMBER
              FROM jtf_rs_groups_vl jtgv
              ,jtf_rs_group_members jtrm
              ,JTF_RS_RESOURCE_EXTNS JTRE
              WHERE jtrm.resource_id=p_ref_resource_id-----reference user
              and JTRE.RESOURCE_ID=JTRM.RESOURCE_ID
              AND jtrm.group_id=jtgv.group_id;

              FOR rec_get_group_member1 IN cur_get_group_member1(p_ref_resource_id)
              LOOP
              jtf_rs_group_members_pub.update_resource_group_members
              (P_API_VERSION =>1.0,
              P_INIT_MSG_LIST =>FND_API.G_FALSE,
              P_COMMIT =>FND_API.G_FALSE,
              P_GROUP_MEMBER_ID =>rec_get_group_member1.group_member_id,
              P_GROUP_ID =>rec_get_group_member1.group_id,
              P_GROUP_NUMBER =>rec_get_group_member1.group_number,
              P_RESOURCE_ID =>100490485,------------resource id of new user
              P_RESOURCE_NUMBER =>'25245',-----------------resource_number of new user
              P_OBJECT_VERSION_NUMBER =>rec_get_group_member1.object_version_number,
              X_RETURN_STATUS =>l_return_status,
              X_MSG_COUNT =>l_msg_count,
              X_MSG_DATA =>l_msg_data
              );

              Edited by: user7199962 on Jan 22, 2013 3:47 AM

              Edited by: user7199962 on Jan 22, 2013 3:50 AM
              • 4. Re: Can anybody help which API use to create and update for resource
                user7199962
                Can anybody have a look in this ..I need this urgently!
                Thanks already for your effort :)

                Regards,
                Javed Khan
                • 5. Re: Can anybody help which API use to create and update for resource
                  user7199962
                  I got the API which can be used to create role in group

                  jtf_rs_role_relate_pub.create_resource_role_relate
                  (P_API_VERSION =>1.0,
                  P_INIT_MSG_LIST =>FND_API.G_FALSE,
                  P_COMMIT =>FND_API.G_FALSE,
                  P_ROLE_RESOURCE_TYPE =>'RS_GROUP_MEMBER',
                  P_ROLE_RESOURCE_ID =>1032932,---group member_id of resource
                  P_ROLE_ID =>rec_get_role_relate.ROLE_ID,
                  P_ROLE_CODE =>rec_get_role_relate.ROLE_CODE,
                  P_START_DATE_ACTIVE =>sysdate,
                  P_END_DATE_ACTIVE =>NULL,
                  X_RETURN_STATUS =>l_return_status,
                  X_MSG_COUNT =>l_msg_count,
                  X_MSG_DATA =>l_msg_data,
                  X_ROLE_RELATE_ID =>l_ROLE_RELATE_ID
                  );

                  Regards,
                  Javed Khan