Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by Frank DiCola · Feb 19 at 06:56 PM · CloudScriptentities

Can the CloudScript Server get and set Group Objects?

Hello! I just tried to do this in CloudScript and my code failed:

var groupObjectData = server.GetObjects({
        "Entity": { "Id": args.guildID, "Type": "group" }
    });

The error says...

"StackTrace": "TypeError: server.GetObjects is not a function

So I looked in the API, and I can't find a Server function that is able to, for example, Get some Group's object data, allowing me to modify it, and then Set that Group's object data. I don't really want the client to handle this, but I guess I can if I really have to?

(This feature is for my volunteer app. It's when a Group claims a shift at a soup kitchen, for example. I want to add the shift into the Group's Object data within a list of upcoming shifts so other people in the Group know about this volunteer shift that's coming up.)

If I have to do this on the client side, I will. I already know that GetObjects works. But if that's the case, my next question is: how come the server can't do this? Is the function just called something else? I thought the server had super permission to do whatever it wants?

NOTE: For the purposes of answering this question, please assume I am not ready to make the switch to Azure functions as I have not looked into that yet and I need this feature sooner rather than later. I'm a solo dev and I want to get core stuff into my business before devoting all this time to refactoring, so the Azure switch is going to take me a while.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Gosen Gao · Feb 21 at 06:00 AM

You can use entity.GetObjects to implement this feature as the Object is part of specific Entity.

Comment
Frank DiCola

People who like this

1 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Frank DiCola · Feb 21 at 08:28 PM 0
Share

Thanks so much Gosen!!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    10 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    ListMembership doesn't work in CloudScript -policy issue? 1 Answer

    Questions about PlayFab security and limits with Azure Functions 2 Answers

    Can't get Display name through entity API 1 Answer

    Photon Webhook url config 1 Answer

    How to deserialize a cloudscript server call back to the client? 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges