Jump to content

Gonzalez, Bruno

Members
  • Posts

    7
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, This looks like a bug to me. Which version of X3 is it ? I would recommend opening a case your Sage support point of contact.
  2. Hi Luksaz, Im' not sure you were trying to do. Please post a message here if you still need guidance.
  3. Hi Kendall, Not sure how progressed back then, but SOAP web services works based on publications. You select the subprogram or the object you want to publish and you work on it. Please note that SOAP isn't the future of X3 Apis, so you might need some customizations to make some object work.
  4. Hi Rui, I mentioned the partner onboarding program page in your other post. Regarding training, there is a GraphQL Training, but the extensibility part will be available in June with the release of 2024R1. Communications will be made in the coming weeks.
  5. Hi Rui, This was delivered for beta testing. Documentation is available in Sage Community Hub in a dedicated Hub where you need to require access as a partner: - ask to join the X3 extensibility onboarding hub: https://communityhub.sage.com/us/sage_x3/x3-extensibility-onboarding/ Only partners (VARs and tech ISVs) with a valid professional email adress are accepted.
  6. Hi Zoey, It seems you aren't using Eclipse. I would recommend you to do so. https://plugin-x3.sagex3.com/safex3/studio/downloads/index.html Every developer has its own style, but please find some common rules we share with many developers in my team (we try at least 😄). I voluntarily stay out of the pat instruction topics or how to code for best performance is it a different topic and an actual training that exists with Sage. I will however say thins: look at Columns and Columns Extended instructions, you will thank me later 😎 https://online-help.sagex3.com/erp/12/en-us/Content/V7DEV/4gl_columns.html?Highlight=columns - Don't make your life more difficult that it already is: your code should be the right balance between readability and maintenance/Search. - Indent with tab key - Indent can be 2 or 4 spaces. Don't mind, don't care. - Separate clearly "features". Like table opening VS actual business code - No spaces around operators: +, =, <>,- - Spaces after a comma separating parameters - this one is mine only, but it helps me see clearer parameters list and also helps with searches - Always specify classes of variables: [F], [M], [V],[S],[L]. Don't leave any doubts possible on the nature of the variable. It also helps the X3 engine avoiding to scan the 5000 variables that exists. FYI Sage X3 studio plugin in Eclipse autocompletes most of the classes, except the F class where you need to explicitly specify it so that Eclipse can list the table fields for you with its details: - Always double double-quotes to manage text. - Keep simple quotes when you need to manage complex strings using double-quotes inside - Always Specify the element you are looping over in a For Next loop on the Next clause, like Next I, or Next ITM - please note when looping over a table, just give the table abbreviation - Split complex or long lines of code by using the & sign on the new line - Avoid over-indenting things to align pad everything vertically. It might look nicer but it makes searches more difficult as you need to use regex to remove extra spaces. - ALWAYS CLOSE YOUR FILTER INSTRUCTION, CAN KEEP THE CLOSING FILTER VISIBLE TO THE OPENING FILTER ON A SINGLE PAGE. Sorry about this one, but this is a typical mistake and it is very very very (did I emphasized on very ?) difficult to find afterwards. - I don't like using & and | signs because they are not colored in Sage X3 Studio plugin of Eclipse, so I use and and or in plan text - Put code snippets that you repeat often in label, and use gosub - create functions every time you can Please find below how I would have done it: If !clalev([F:ZPI]) : Local File PINVOICED[F:ZPI] : Endif If !clalev([F:ZGA]) : Local File GACCENTRYD[F:ZGA] : Endif If !pat([M:PAY0]NUM, "IP*") For I=0 To [M:PAY1]NBLIG-1 If (!pat([M:PAY1]VCRNUM(I), "ORD*") & and !pat([M:PAY1]VCRNUM(I), "BTS*") & and !pat([M:PAY1]VCRNUM(I), "WEB*")) Filter [F:ZGA] Where [F:ZGA]TYP=[M:PAY1]VCRTYP(I) and [F:ZGA]NUM=[M:PAY1]VCRNUM(I) Read [F:ZGA] First If [S]fstat=0 If [F:ZGA]BPR<>"V5555" [M:PAY1]ZOKYAKU(I)=[F:ZGA]BPR+" - "+func AFNC.INTFLD("BPARTNER", "BPRNAM", [F:ZGA]BPR) Gosub $AFFZO_ZOKYAKU Else Filter [F:ZPI] Where [F:ZGA]NUM=[M:PAY1]VCRNUM(I) and [F:ZGA]NUMORI<>"" Read [F:ZPI] First If [S]fstat=0 [M:PAY1]ZOKYAKU(I)=func AFNC.INTFLD("PRECEIPT", "BPSNUM", [F:ZPI]NUMORI)+" - "+ & func AFNC.INTFLD("BPARTNER", "BPRNAM", func AFNC.INTFLD("PRECEIPT", "BPSNUM", [F:ZPI]NUMORI)) Gosub $AFFZO_ZOKYAKU Endif Filter [F:ZPI] Endif Endif Filter [F:ZGA] #Super important ! Else [M:PAY1]ZOKYAKU(I)=func AFNC.INTFLD("SORDER", "BPCINV", [M:PAY1]VCRNUM(I)+"~")+" - "+ & func AFNC.INTFLD("SORDER", "BPINAM", [M:PAY1]VCRNUM(I)+"~") Gosub $AFFZO_ZOKYAKU Endif Next I Endif End $AFFZO_ZOKYAKU Affzo [M:PAY1]ZOKYAKU(I) Return And what it looks like in Eclipse:
  7. Hi Alessandro, If you read the .Net code, it modifies the web query HTTP header to add the property "Authorization" with the value "Basic" + the user and password encoded in base64. This being said, basic authentication shouldn't be used for production. It is recommended to use Json Web Tokens through X3 connected Apps: https://jwt.io/ https://online-help.sagex3.com/erp/12/en-us/Content/V7DEV/administration-reference_connected-applications.html?Highlight=connected applications In a connected app, you define the calling app, and can select a user assigned to it. Create one app per user if you have several. Define the token validaty in seconds. When you create the app, it gives you a client id and secret. These credentials will allow you creating a Json Web Token that you can use in the HTTP header property "Authorization" with value "Bearer" plus your token. Keep the secret in a safe location, not in clear text. if you loose it or you think it may be compromised, then regenerate the secret from the connected app or delete the app and create a new one to get a new pair client id/secret: It is the responsibility of the calling application to manage the JWT, meaning if you set the token to be expired every hour, then your application needs to to detect that the token is expired (HTTP return code should be 401) and implement JWT token generation from the client id and secret you've stored securely on your side. I hope this helps.
×
×
  • Create New...